Пример #1
0
 public static void popUp(string text, int time, Color fontColor ,Color boxColor, Color borderColor)
 {
     var popUp = new Notification(text).SetTextColor(fontColor);
     popUp.SetBoxColor(boxColor);
     popUp.SetBorderColor(borderColor);
     Notifications.AddNotification(popUp);
     Utility.DelayAction.Add(time, () => popUp.Dispose());
 }
Пример #2
0
 public static void ShowNotification(string message, Color colour, int duration = -1, bool dispose = true)
 {
     var notify = new Notification(message).SetTextColor(colour);
     Notifications.AddNotification(notify);
     if (dispose)
     {
         Utility.DelayAction.Add(duration, () => notify.Dispose());
     }
 }
Пример #3
0
 public static Notification ShowNotification(string message, Color color, int duration = -1, bool dispose = true)
 {
     var notif = new Notification(message).SetTextColor(color);
     Notifications.AddNotification(notif);
     if (dispose)
     {
         Utility.DelayAction.Add(duration, () => notif.Dispose());
     }
     return notif;
 }
        public static void ShowInfo(string text)
        {
            if (Environment.TickCount - _lastInfoNotification >= NotificationDelay || !NotificationsEnabled)
            {
                return;
            }

            var notification = new Notification(text, 5000);
            Notifications.AddNotification(notification);

            _lastInfoNotification = Environment.TickCount;
        }
        public static void ShowGapcloserAlert()
        {
            if (Environment.TickCount - _lastGapcloserAlert >= NotificationDelay || !NotificationsEnabled)
            {
                return;
            }

            var notification = new Notification("GAPCLOSER!", 2500) {TextColor = new ColorBGRA(255, 0, 0, 255)};

            notification.Flash(500);
            Notifications.AddNotification(notification);

            _lastGapcloserAlert = Environment.TickCount;
        }
 public static void OnLoad()
 {
     var dzaioNotification = new Notification("[DZAIO]", -1)
     {
         TextColor = Color.Red,
         Font =
             new Font(
                 LeagueSharp.Drawing.Direct3DDevice, 0xd, 0x0, FontWeight.Bold, 0x0, false,
                 FontCharacterSet.Default, FontPrecision.Default, FontQuality.Antialiased,
                 FontPitchAndFamily.DontCare | FontPitchAndFamily.Decorative, "Tahoma"),
         BorderColor = Color.White
     };
     var cassioNotification = new Notification("Cassiopeia Loaded", -1);
    // Notifications.AddNotification(dzaioNotification);
     //Notifications.AddNotification(cassioNotification);
 }
    public static void Update()
    {
      var text = "Recommended Windup: " + Program.windup;

      if (_modeNotificationHandler == null)
      {
        _modeNotificationHandler = new Notification(text)
        {
          TextColor = new ColorBGRA(124, 252, 0, 255)
        };
        Notifications.AddNotification("By DanZ and Drunkenninja");
        Notifications.AddNotification(_modeNotificationHandler);
      }

      _modeNotificationHandler.Text = text;
    }
Пример #8
0
        public static void ShowWarningAlert(string text)
        {
            if (Environment.TickCount - _lastWarningAlert >= NotificationDelay || !NotificationsEnabled)
            {
                return;
            }

            var notification = new Notification(text, 5000)
            {
                TextColor = new ColorBGRA(255, 255, 0, 255)
            };

            Notifications.AddNotification(notification);

            _lastWarningAlert = Environment.TickCount;
        }
Пример #9
0
        public static void ShowInterrupterAlert(bool interrupted)
        {
            if (Environment.TickCount - _lastInterrupterAlert >= NotificationDelay || !NotificationsEnabled)
            {
                return;
            }

            var notification = new Notification(interrupted ? "Interrupted!" : "Failed to interrupt!", 2500)
            {
                TextColor = interrupted ? new ColorBGRA(0, 255, 0, 255) : new ColorBGRA(255, 0, 0, 255)
            };

            notification.Flash(500);
            Notifications.AddNotification(notification);

            _lastInterrupterAlert = Environment.TickCount;
        }
        public static void Update()
        {
            var text = "Snitcher: " + (Program.Menu.Item("Enabled").GetValue<bool>() ||
                Program.Menu.Item("EnabledKeybind").GetValue<KeyBind>().Active ? "Enabled" : "Disabled");

            if (_modeNotificationHandler == null)
            {
                _modeNotificationHandler = new Notification("Snitcher: " + text)
                {
                    TextColor = new ColorBGRA(124, 252, 0, 255)
                };

                Notifications.AddNotification(_modeNotificationHandler);
            }

            _modeNotificationHandler.Text = text;
        }
Пример #11
0
        /// <summary>
        ///     The obj_ a i_ base_ on process spell cast.
        /// </summary>
        /// <param name="sender">
        ///     The sender.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender == null || !sender.IsValid)
            {
                return;
            }

            var spell = sender.Spellbook.Spells.FirstOrDefault(s => s.SData.Hash == args.SData.Hash);

            if (spell != null && spell.Slot == SpellSlot.R)
            {
                var notification =
                    new Notification(
                        string.Format(
                            "{0} has just cast {1}, will be back up in {2}",
                            sender.Name,
                            spell.Slot,
                            spell.Cooldown),
                        5 * 1000);
                notification.Flash();

                Notifications.AddNotification(notification);
            }
        }
Пример #12
0
 public WoodenPc()
 {
     if (Game.Mode == GameMode.Running)
     {
         return;
     }
     SetupMenu();
     WoodenPcMisc.GetMenuItem("SAssembliesMiscsWoodenPcActive").ValueChanged += Active_OnValueChanged;
     notification = Common.ShowNotification("Waiting for the packet", Color.LawnGreen, -1);
     Game.OnSendPacket += Game_OnSendPacket;
     Game.OnWndProc += Game_OnWndProc;
     GameUpdate updateEvent = null;
     updateEvent = delegate
     {
         if (Game.Mode == GameMode.Running)
         {
             Console.WriteLine(LeagueSharp.Common.Menu.RootMenus.Remove(Assembly.GetExecutingAssembly().GetName().Name + "." + WoodenPcMisc.Menu.Name));
             WoodenPcMisc.GetMenuItem("SAssembliesMiscsWoodenPcActive").ValueChanged -= Active_OnValueChanged;
             WoodenPcMisc.Menu = null;
             Game.OnUpdate -= updateEvent;
         }
     };
     Game.OnUpdate += updateEvent;
 }
Пример #13
0
        private static void KurisuAndL33TAreBadAtLeagueAndCoreyIsGayWithZezzy(EventArgs args)
        {
            foreach (var minion in iStole14CreepsFromMyoAndHeBlockedMyOneSkype)
            {
                if (!minion.IsValid<Obj_AI_Minion>())
                {
                    iStole14CreepsFromMyoAndHeBlockedMyOneSkype.RemoveAll(m => m.NetworkId == minion.NetworkId);
                    break;
                }

                if (minion.Position.Distance(Player.Position) < 0x1f4 && NerdyILikeItAsunaIsAFuckingWeebo.All(m => m.NetworkId != minion.NetworkId))
                {
                    NerdyILikeItAsunaIsAFuckingWeebo.Add(minion);
                }
            }

            foreach (var minion in NerdyILikeItAsunaIsAFuckingWeebo.Where(minion => minion.IsDead))
            {
                siwyyOpensATopicAndHisContentContainsTheWordTitle++;
                NerdyILikeItAsunaIsAFuckingWeebo.RemoveAll(m => m.NetworkId == minion.NetworkId);
            }

            //patented
            creepAdminOnGoSMeme += (siwyyOpensATopicAndHisContentContainsTheWordTitle - Player.MinionsKilled) > creepAdminOnGoSMeme
                                ? Math.Abs(creepAdminOnGoSMeme - (siwyyOpensATopicAndHisContentContainsTheWordTitle - Player.MinionsKilled))
                                : 0x0;

            /*Console.WriteLine("DEBUG:");
            Console.WriteLine("ALLMINIONSCOUNT: " + MinionList.Count);
            Console.WriteLine("CLOSESTMINIONSCOUNT: " + MinionsCloseToMeList.Count);
            Console.WriteLine("DED MINIONS: " + totalMinionsThatDied);
            Console.WriteLine("CS: " + Player.MinionsKilled);
            Console.WriteLine("MISSED CS: " + Math.Abs(totalMinionsThatDied - Player.MinionsKilled));*/

            var text = "";

            if (notification == null)
            {
                notification = new Notification(text)
                {
                    TextColor = new ColorBGRA(red: 0xff, green: 0xff, blue: 255, alpha: 0xff)
                };

                Notifications.AddNotification(notification);
            }

            notification.Text = creepAdminOnGoSMeme + " missed creeps" + text;
        }
Пример #14
0
 public static void ShowWelcome()
 {
     var notification = new Notification("EasyPeasyRivenSqueezy v" + Assembly.GetExecutingAssembly().GetName().Version + " loaded!", 10000);
     Notifications.AddNotification(notification);
 }
Пример #15
0
        public static void CreateMenu(Menu Menu)
        {
            Config = new Menu("ProBuilds", "ProBuilds", true);
            var settings = new Menu("Misc", "Misc");
            Config.AddItem(new MenuItem("leveler", "ProLeveler").SetValue(true));
            Config.Item("leveler").ValueChanged += (s, e) =>
            {
                AutoLevel.Enabled(e.GetNewValue<bool>());
                Console.WriteLine("ProLeveler: " + e.GetNewValue<bool>());
                if (e.GetNewValue<bool>())
                {
                    var sequence = BuildData.SkillSequence;
                    Console.Write(sequence);
                    new AutoLevel(sequence);
                }
            };

            settings.AddItem(new MenuItem("notif", "Enable Notifications")).SetValue(false);
            Config.AddSubMenu(settings);
            foreach (var build in BuildData.BuildsList)
            {

                Random Random = new Random();
                var BuildName = "Build " + BuildData.BuildsList.IndexOf(build);
                var BuildMenu = new Menu(BuildName, BuildName);
                var starting = BuildMenu.AddSubMenu(new Menu("Starting", "Starting"));
                var Buildorder = BuildMenu.AddSubMenu(new Menu("Order", "Build Order"));
                var Final = BuildMenu.AddSubMenu(new Menu("Final Items", "Final"));
                var Summary = BuildMenu.AddSubMenu(new Menu("Build Summary", "Summary"));

                if (BuildData.BuildsList.IndexOf(build) == 0 && NotifOn())
                {
                    INotification start = new Notification("Starting Items", 60000);
                    Notifications.AddNotification(start);
                }
                foreach (var si in build.startingitems)
                {
                    starting.AddItem(new MenuItem(si + Random.Next(), si));
                    if (BuildData.BuildsList.IndexOf(build) == 0 && NotifOn())
                    {
                        INotification buildnotif = new Notification(si, 100000);
                        Notifications.AddNotification(buildnotif);
                    }
                }
                if (BuildData.BuildsList.IndexOf(build) == 0 && NotifOn())
                {
                    INotification start = new Notification("Build Order", 100000);
                    Notifications.AddNotification(start);
                }

                foreach (var bo in build.buildorder)
                {
                    Buildorder.AddItem(new MenuItem(bo + Random.Next(), bo));
                    if (BuildData.BuildsList.IndexOf(build) == 0 && NotifOn())
                    {
                        INotification buildnotif = new Notification(bo, 100000);
                        Notifications.AddNotification(buildnotif);
                    }

                }
                if (BuildData.BuildsList.IndexOf(build) == 0 && NotifOn())
                {
                    INotification start = new Notification("Final Items", 100000);
                    Notifications.AddNotification(start);
                }
                foreach (var finalitem in build.finalitems)
                {
                    Final.AddItem(new MenuItem(finalitem + Random.Next(), finalitem));
                    if (BuildData.BuildsList.IndexOf(build) == 0 && NotifOn())
                    {
                        INotification buildnotif = new Notification(finalitem, 100000);
                        Notifications.AddNotification(buildnotif);
                    }

                }

                foreach (var summitem in build.buildsummary)
                {
                    Summary.AddItem(new MenuItem(summitem + Random.Next(), summitem));
                }

                Config.AddSubMenu(BuildMenu);
            }
            Config.AddToMainMenu();
        }
Пример #16
0
        public void Load(EventArgs loadargs)
        {
            try
            {
                if (ObjectManager.Player.ChampionName != "Brand")
                    return;

                var notification = new Notification("The Brand loaded", 10000) { TextColor = new SharpDX.ColorBGRA(255, 0, 0, 255), BorderColor = new SharpDX.ColorBGRA(139, 100, 0, 255) };
                Notifications.AddNotification(notification);

                _mainMenu = CreateMenu("The Brand", true);
                Menu orbwalkerMenu = CreateMenu("Orbwalker", _mainMenu);
                var targetSelectorMenu = CreateMenu("Target Selector", _mainMenu);
                var comboMenu = CreateMenu("Combo", _mainMenu);
                var harassMenu = CreateMenu("Harass", _mainMenu);
                var laneclearMenu = CreateMenu("Laneclear", _mainMenu);
                var manamanagerMenu = CreateMenu("Manamanager", _mainMenu);
                var igniteMenu = CreateMenu("Ignite", _mainMenu);
                var miscMenu = CreateMenu("Misc", _mainMenu);
                var antiGapcloser = CreateMenu("Anti gapcloser", _mainMenu);
                var interrupter = CreateMenu("Interrupter", _mainMenu);
                var autoLevel = CreateMenu("Auto level spells", _mainMenu);
                var drawingMenu = CreateMenu("Drawing", _mainMenu);

                _orbwalker = new Orbwalking.Orbwalker(orbwalkerMenu);
                TargetSelector.AddToMenu(targetSelectorMenu);

                _comboProvider = new BrandCombo(1050, _orbwalker, new BrandQ(SpellSlot.Q), new BrandW(SpellSlot.W), new BrandE(SpellSlot.E), new BrandR(SpellSlot.R));

                _comboProvider.CreateBasicMenu(comboMenu, harassMenu, null, antiGapcloser, interrupter, manamanagerMenu, igniteMenu, null, drawingMenu);
                _comboProvider.CreateLaneclearMenu(laneclearMenu, true, SpellSlot.Q, SpellSlot.R);
                _comboProvider.CreateAutoLevelMenu(autoLevel, ComboProvider.SpellOrder.RWQE, ComboProvider.SpellOrder.RWQE);

                var rOptions = CreateMenu("Ult Options", comboMenu);
                rOptions.AddMItem("Bridge R", false, (sender, args) => _comboProvider.GetSkill<BrandR>().UseBridgeUlt = args.GetNewValue<bool>()).ProcStoredValueChanged<bool>();
                rOptions.AddMItem("", "_");
                rOptions.AddMItem("Risky R", true, (sender, args) => _comboProvider.GetSkill<BrandR>().RiskyUlt = args.GetNewValue<bool>()).ProcStoredValueChanged<bool>();
                rOptions.AddMItem("(R bounces, no 100% success)");
                rOptions.AddMItem("", "__");
                rOptions.AddMItem("Ult non killable", true, (sender, args) => _comboProvider.GetSkill<BrandR>().UltNonKillable = args.GetNewValue<bool>()).ProcStoredValueChanged<bool>();
                rOptions.AddMItem("when min X targets", new Slider(Math.Min(HeroManager.Enemies.Count, 1), 1, Math.Max(HeroManager.Enemies.Count, 2)), (sender, args) => _comboProvider.GetSkill<BrandR>().MinBounceTargets = args.GetNewValue<Slider>().Value).ProcStoredValueChanged<Slider>();
                rOptions.AddMItem("", "___");
                rOptions.AddMItem("Don't R with", true, (sender, args) => _comboProvider.GetSkill<BrandR>().AntiOverkill = args.GetNewValue<bool>()).ProcStoredValueChanged<bool>();
                rOptions.AddMItem("% Health difference", new Slider(60), (sender, args) => _comboProvider.GetSkill<BrandR>().OverkillPercent = args.GetNewValue<Slider>().Value).ProcStoredValueChanged<Slider>();
                rOptions.AddMItem("Ignore when fleeing", true, (sender, args) => _comboProvider.GetSkill<BrandR>().IgnoreAntiOverkillOnFlee = args.GetNewValue<bool>()).ProcStoredValueChanged<bool>();
                rOptions.ProcStoredValueChanged<bool>();
                rOptions.ProcStoredValueChanged<Slider>();

                laneclearMenu.AddMItem("Min W targets", new Slider(3, 1, 10), (sender, args) => _comboProvider.GetSkill<BrandW>().WaveclearTargets = args.GetNewValue<Slider>().Value).ProcStoredValueChanged<Slider>();

                miscMenu.AddMItem("E on fire-minion", true, (sender, args) => _comboProvider.GetSkill<BrandE>().UseMinions = args.GetNewValue<bool>());
                miscMenu.AddMItem("Try AOE with W", true, (sender, args) => _comboProvider.GetSkill<BrandW>().TryAreaOfEffect = args.GetNewValue<bool>());
                miscMenu.AddMItem("E farm assist", true, (sender, args) => _comboProvider.GetSkill<BrandE>().FarmAssist = args.GetNewValue<bool>());
                miscMenu.AddMItem("E Killsteal", true, (sender, args) => _comboProvider.GetSkill<BrandE>().Killsteal = args.GetNewValue<bool>());
                miscMenu.AddMItem("Only KS in Combo", false, (sender, args) => _comboProvider.GetSkill<BrandE>().KillstealCombo = args.GetNewValue<bool>());
                miscMenu.AddMItem("Force AA in combo", false, (sender, args) => _comboProvider.ForceAutoAttacks = args.GetNewValue<bool>());
                miscMenu.AddMItem("Targetselector range", new Slider((int)_comboProvider.TargetRange, 900, 1500), (sender, args) => { _comboProvider.TargetRange = args.GetNewValue<Slider>().Value; });
                miscMenu.ProcStoredValueChanged<bool>();

                interrupter.AddMItem("E Usage", true, (sender, args) =>
                {
                    _comboProvider.GetSkill<BrandW>().InterruptE = args.GetNewValue<bool>();
                    _comboProvider.GetSkill<BrandE>().InterruptE = args.GetNewValue<bool>();
                });
                interrupter.AddMItem("W Usage", true, (sender, args) => _comboProvider.GetSkill<BrandW>().InterruptW = args.GetNewValue<bool>());
                interrupter.ProcStoredValueChanged<bool>();

                drawingMenu.AddMItem("Damage indicator", new Circle(true, Color.Yellow), (sender, args) =>
                {
                    DamageIndicator.Enabled = args.GetNewValue<Circle>().Active;
                    DamageIndicator.Fill = true;
                    DamageIndicator.FillColor = Color.FromArgb(100, args.GetNewValue<Circle>().Color);
                    DamageIndicator.Color = Color.FromArgb(200, DamageIndicator.FillColor);
                    DamageIndicator.DamageToUnit = _comboProvider.GetComboDamage;
                }).ProcStoredValueChanged<Circle>();

                drawingMenu.AddMItem("W Prediction", new Circle(false, Color.Red), (sender, args) =>
                {
                    _comboProvider.GetSkill<BrandW>().DrawPredictedW = args.GetNewValue<Circle>().Active;
                    _comboProvider.GetSkill<BrandW>().PredictedWColor = args.GetNewValue<Circle>().Color;
                });

                _drawW = drawingMenu.AddMItem("W Range", new Circle(true, Color.Red));
                _drawQ = drawingMenu.AddMItem("Q Range", new Circle(false, Color.OrangeRed));
                _drawE = drawingMenu.AddMItem("E Range", new Circle(false, Color.Goldenrod));
                _drawR = drawingMenu.AddMItem("R Range", new Circle(false, Color.DarkViolet));

                drawingMenu.ProcStoredValueChanged<Circle>();
                _mainMenu.AddToMainMenu();

                _comboProvider.Initialize();

                Game.OnUpdate += Tick;
                Drawing.OnDraw += Draw;
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error initialitzing TheBrand: " + ex);
            }
        }
Пример #17
0
        private static void OnUpdate(EventArgs args)
        {
            foreach (var minion in MinionList)
            {
                if (minion == null || !minion.IsValid)
                {
                    MinionList.RemoveAll(m => m.NetworkId == minion.NetworkId);
                    break;
                }

                if (minion.IsVisible && minion.Position.Distance(Player.Position) < 500 && MinionsCloseToMeList.All(m => m.NetworkId != minion.NetworkId))
                {
                    MinionsCloseToMeList.Add(minion);
                }
            }

            foreach (var minion in MinionsCloseToMeList.Where(minion => !MinionList.Contains(minion)))
            {
                MinionsCloseToMeList.RemoveAll(m => m.NetworkId == minion.NetworkId);
                totalMinionsThatDied += 1 + 1 - 1;
                break;
            }

            //System.Linq.Enumerable.WhereListIterator`1.MoveNext()
            //patented
            //missedCreeps += (totalMinionsThatDied - Player.MinionsKilled) > missedCreeps ? 1 : 0;

            missedCreeps += (totalMinionsThatDied - Player.MinionsKilled) > missedCreeps
                                ? Math.Abs(missedCreeps - (totalMinionsThatDied - Player.MinionsKilled))
                                : 0;

            /*Console.WriteLine("DEBUG:");
            Console.WriteLine("ALLMINIONSCOUNT: " + MinionList.Count);
            Console.WriteLine("CLOSESTMINIONSCOUNT: " + MinionsCloseToMeList.Count);
            Console.WriteLine("DED MINIONS: " + totalMinionsThatDied);
            Console.WriteLine("CS: " + Player.MinionsKilled);
            Console.WriteLine("MISSED CS: " + Math.Abs(totalMinionsThatDied - Player.MinionsKilled));*/

            var text = "";

            if (notification == null)
            {
                notification = new Notification(text)
                {
                    TextColor = new ColorBGRA(red: 0xff, green: 0xff, blue: 255, alpha: 0xff)
                };

                Notifications.AddNotification(notification);
            }

            notification.Text = missedCreeps + " missed creeps" + text;
        }
Пример #18
0
 private void Game_OnSendPacket(GamePacketEventArgs args)
 {
     try
     {
         if (Game.Mode != GameMode.Running && IsActive())
         {
             //Console.Write("Packet Sent: ");
             //Array.ForEach(args.PacketData, x => Console.Write(x + " "));
             //Console.WriteLine();
             if (args.PacketData.Length != 6 || packetSent || packet != null)
                 return;
             args.Process = false;
             packet = new MemoryStream(args.PacketData, 0, args.PacketData.Length);
             Notifications.RemoveNotification(notification);
             notification.Dispose();
             notification = Common.ShowNotification("Press spacebar to continue.", Color.YellowGreen, -1);
             ms = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
             drawingEvent = delegate
             {
                 if (!packetSent && (ms + (250 * 1000)) < (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond))
                 {
                     Console.WriteLine((ms + (250 * 1000)) + " " + DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond);
                     Game.SendPacket(packet.ToArray(), PacketChannel.C2S, PacketProtocolFlags.Reliable);
                     packetSent = true;
                     if (notification != null)
                     {
                         Notifications.RemoveNotification(notification);
                         notification.Dispose();
                     }
                     if (notificationRemaining != null)
                     {
                         Notifications.RemoveNotification(notificationRemaining);
                         notificationRemaining.Dispose();
                     }
                     notification = Common.ShowNotification("Game starts now. Prepare!", Color.OrangeRed, 1000);
                     Drawing.OnDraw -= drawingEvent;
                 }
                 else
                 {
                     if (notificationRemaining == null)
                     {
                         notificationRemaining =
                         Common.ShowNotification(
                             "Remaining: " +
                             (ms + (250 * 1000) - DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond).ToString(),
                             Color.YellowGreen, 250 * 1000);
                     }
                     else
                     {
                         notificationRemaining.Text = "Remaining: " +
                             ((ms + (250 * 1000) - DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) / 1000).ToString() + "s";
                     }
                 }
             };
             Drawing.OnDraw += drawingEvent;
         }
         else
         {
             if (notification != null)
             {
                 Notifications.RemoveNotification(notification);
                 notification.Dispose();
             }
             if (notificationRemaining != null)
             {
                 Notifications.RemoveNotification(notificationRemaining);
                 notificationRemaining.Dispose();
             }
         }
     }
     catch (Exception)
     {
     }
 }
Пример #19
0
 static void Game_OnStart(EventArgs args)
 {
     Notification startup = new Notification("Marksmenhelper by newchild loaded");
 }
Пример #20
0
 private void Game_OnWndProc(WndEventArgs args)
 {
     if ((WindowsMessages)args.Msg != WindowsMessages.WM_KEYUP || args.WParam != 32 || packetSent || packet == null || !IsActive())
         return;
     Game.SendPacket(packet.ToArray(), PacketChannel.C2S, PacketProtocolFlags.Reliable);
     packetSent = true;
     if (notification != null)
     {
         Notifications.RemoveNotification(notification);
         notification.Dispose();
     }
     if (notificationRemaining != null)
     {
         Notifications.RemoveNotification(notificationRemaining);
         notificationRemaining.Dispose();
     }
     if (drawingEvent != null)
     {
         Drawing.OnDraw -= drawingEvent;
     }
     notification = Common.ShowNotification("Game starts now. Prepare!", Color.OrangeRed, 1000);
 }
Пример #21
0
        public void Load(EventArgs eArgs)
        {
            if (ObjectManager.Player.ChampionName != "Twitch")
                return;

            //DevAssistant.Init();

            var notification = new Notification("The Twitch loaded", 3) { TextColor = new SharpDX.ColorBGRA(0, 255, 0, 255), BorderColor = new SharpDX.ColorBGRA(144, 238, 144, 255) };
            Notifications.AddNotification(notification);

            var mainMenu = CreateMenu("The Twitch", true);
            var orbwalkerMenu = CreateMenu("Orbwalker", mainMenu);
            var targetSelectorMenu = CreateMenu("Targetselector", mainMenu);
            var comboMenu = CreateMenu("Combo", mainMenu);
            var harassMenu = CreateMenu("Harass", mainMenu);
            var laneclearMenu = CreateMenu("Laneclear", mainMenu);
            var miscMenu = CreateMenu("Misc", mainMenu);
            var antigapcloserMenu = CreateMenu("Anti gapcloser", mainMenu);
            var itemMenu = CreateMenu("Items", mainMenu);
            var summonerMenu = CreateMenu("Summoners", mainMenu);
            var autoLevelSpells = mainMenu.CreateSubmenu("Auto level spells");
            var manamanagerMenu = CreateMenu("Manamanager", mainMenu);
            var drawingMenu = CreateMenu("Drawing", mainMenu);

            _orbwalker = new Orbwalking.Orbwalker(orbwalkerMenu);
            TargetSelector.AddToMenu(targetSelectorMenu);

            var combo = new TwitchCombo(1000, _orbwalker, new TwitchQ(SpellSlot.Q), new TwitchW(SpellSlot.W), new TwitchE(SpellSlot.E), new TwitchR(SpellSlot.R));

            combo.CreateBasicMenu(comboMenu, harassMenu, null, antigapcloserMenu, null, manamanagerMenu, summonerMenu, itemMenu, drawingMenu);
            combo.CreateLaneclearMenu(laneclearMenu, true, SpellSlot.Q);
            combo.CreateAutoLevelMenu(autoLevelSpells, ComboProvider.SpellOrder.REWQ, ComboProvider.SpellOrder.REQW);

            comboMenu.Item("Combo.UseQ").DisplayName += " (for attackspeed)";

            comboMenu.AddMItem("Min Enemies near for R", new Slider(Math.Min(2, HeroManager.Enemies.Count), 1, Math.Max(2, HeroManager.Enemies.Count)), (sender, args) => combo.GetSkill<TwitchR>().MinEnemies = args.GetNewValue<Slider>().Value);
            comboMenu.AddMItem("E at full stacks", true, (sender, args) => combo.GetSkill<TwitchE>().AlwaysExecuteAtFullStacks = args.GetNewValue<bool>());
            comboMenu.AddMItem("Custom E calculation", true, (sender, args) => combo.GetSkill<TwitchE>().CustomCalculation = args.GetNewValue<bool>());
            comboMenu.AddMItem("Only W after if >= X stacks", new Slider(0, 0, 6), (sender, args) => combo.GetSkill<TwitchW>().ComboAfterStacks = args.GetNewValue<Slider>().Value);
            comboMenu.AddMItem("(W dmg scales on stacks)");
            comboMenu.ProcStoredValueChanged<Slider>();
            comboMenu.ProcStoredValueChanged<bool>();

            harassMenu.AddMItem("E after trade if >= X stacks", new Slider(3, 1, 6), (sender, args) => combo.GetSkill<TwitchE>().HarassActivateWhenLeaving = args.GetNewValue<Slider>().Value);
            harassMenu.AddMItem("Only W after if >= X stacks", new Slider(0, 0, 6), (sender, args) => combo.GetSkill<TwitchW>().HarassAfterStacks = args.GetNewValue<Slider>().Value);
            harassMenu.ProcStoredValueChanged<Slider>();

            antigapcloserMenu.AddMItem("Uses W if enabled");

            laneclearMenu.AddMItem("Min W targets", new Slider(4, 1, 8), (sender, args) => combo.GetSkill<TwitchW>().MinFarmMinions = args.GetNewValue<Slider>().Value);
            laneclearMenu.AddMItem("Min E kills", new Slider(3, 1, 8), (sender, args) => combo.GetSkill<TwitchE>().MinFarmMinions = args.GetNewValue<Slider>().Value);
            laneclearMenu.AddMItem("Min E targets", new Slider(6, 1, 16), (sender, args) => combo.GetSkill<TwitchE>().MinFarmDamageMinions = args.GetNewValue<Slider>().Value);
            laneclearMenu.AddMItem("(Uses E if kills OR targets are here)");
            laneclearMenu.ProcStoredValueChanged<Slider>();

            miscMenu.AddMItem("E Killsteal", true, (sender, args) => combo.GetSkill<TwitchE>().Killsteal = args.GetNewValue<bool>());
            miscMenu.AddMItem("E farm assist", false, (sender, args) => combo.GetSkill<TwitchE>().FarmAssist = args.GetNewValue<bool>());
            miscMenu.AddMItem("W AOE prediction", true, (sender, args) => combo.GetSkill<TwitchW>().IsAreaOfEffect = args.GetNewValue<bool>());
            combo.GetSkill<TwitchQ>().StealthRecall = miscMenu.AddMItem("Stealh recall", new KeyBind(66, KeyBindType.Press));
            miscMenu.AddMItem("Don't W during R", false, (sender, args) => combo.GetSkill<TwitchW>().NotDuringR = args.GetNewValue<bool>());
            miscMenu.AddMItem("Auto buy blue trinket", true, (sender, args) => combo.AutoBuyBlueTrinket = args.GetNewValue<bool>());
            miscMenu.AddMItem("Blue trinket when level:", new Slider(6, 1, 18), (sender, args) => combo.BlueTrinketLevel = args.GetNewValue<Slider>().Value);
            miscMenu.ProcStoredValueChanged<bool>();
            miscMenu.ProcStoredValueChanged<Slider>();

            //drawingMenu.AddMItem("Draw Q Range", new Circle(true, Color.Gray), (sender, args) => combo.GetSkill<TwitchQ>().DrawRange = args.GetNewValue<Circle>());
            combo.GetSkill<TwitchQ>().DrawRange = new Circle(true, Color.Gray);

            drawingMenu.AddMItem("Draw W Range", new Circle(false, Color.LightGreen), (sender, args) => combo.GetSkill<TwitchW>().DrawRange = args.GetNewValue<Circle>());
            drawingMenu.AddMItem("Draw E Range", new Circle(true, Color.DarkGreen), (sender, args) => combo.GetSkill<TwitchE>().DrawRange = args.GetNewValue<Circle>());
            drawingMenu.AddMItem("Draw R Range", new Circle(false, Color.Goldenrod), (sender, args) => combo.GetSkill<TwitchR>().DrawRange = args.GetNewValue<Circle>());
            drawingMenu.ProcStoredValueChanged<Circle>();

            combo.Initialize();
            mainMenu.AddToMainMenu();

            Game.OnUpdate += _ => combo.Update();
        }
Пример #22
0
        public static void Update()
        {
            if (!NotificationsEnabled)
            {
                // Remove mode notification if user turned notifications off
                if (_modeNotification != null)
                {
                    Notifications.RemoveNotification(_modeNotification);
                    _modeNotification = null;
                }

                if (_rModeNotification != null)
                {
                    Notifications.RemoveNotification(_rModeNotification);
                    _rModeNotification = null;
                }

                return;
            }

            if (_modeNotification == null)
            {
                _modeNotification = new Notification("Mode: " + Riven.Orbwalker.ActiveMode)
                {
                    TextColor = new ColorBGRA(124, 252, 0, 255)
                };

                Notifications.AddNotification(_modeNotification);
            }

            if (_rModeNotification == null)
            {
                _rModeNotification = new Notification("R Mode: " + Riven.Menu.Item("UseROption").GetValue<StringList>().SelectedValue)
                {
                    TextColor = new ColorBGRA(0, 153, 250, 255)
                };

                Notifications.AddNotification(_rModeNotification);
            }

            if (Riven.Menu.Item("FleeActive").IsActive())
            {
                _modeNotification.Text = "Mode: Flee";
            }
            else
            {
                _modeNotification.Text = "Mode: " + Riven.Orbwalker.ActiveMode;
            }

            _rModeNotification.Text = "R Mode: " + Riven.Menu.Item("UseROption").GetValue<StringList>().SelectedValue;
        }
Пример #23
0
        private static void Permashow()
        {
            var prioCombo = ElRengarMenu._menu.Item("ElRengar.Combo.Prio").GetValue<StringList>();

            var text = "";

            switch (prioCombo.SelectedIndex)
            {
                case 0:
                    text = "E";
                    break;
                case 1:
                    text = "W";
                    break;
                case 2:
                    text = "Q";
                    break;
            }

            if (notification == null)
            {
                notification = new Notification(text)
                { TextColor = new ColorBGRA(red: 255, green: 255, blue: 255, alpha: 255) };

                Notifications.AddNotification(notification);
            }

            notification.Text = "Prioritized combo spell: " + text;
        }
Пример #24
0
        private static void GameOnOnGameLoad(EventArgs args)
        {
            OnNotification = new Notification("Snitched Reloaded: On")
            {
                TextColor = new ColorBGRA(Color.Turquoise.R, Color.Turquoise.G, Color.Turquoise.B, Color.Turquoise.A),
                BorderColor = new ColorBGRA(Color.Turquoise.R, Color.Turquoise.G, Color.Turquoise.B, Color.Turquoise.A)
            };
            Notifications.AddNotification(OnNotification);

            BlueBuffs = new List<Obj_AI_Minion>();
            RedBuffs = new List<Obj_AI_Minion>();
            CastedSpellsNames = new List<string>();

            // Create menu
            Menu = new Menu("Snitched: RELOADED", "snitchedreload", true);

            // Buffs
            var buffMenu = new Menu("Buffs", "buffs");
            buffMenu.AddItem(new MenuItem("StealAllyBlue", "Steal Ally Blue Buff").SetValue(false));
            buffMenu.AddItem(new MenuItem("StealAllyRed", "Steal Ally Red Buff").SetValue(false));
            buffMenu.AddItem(new MenuItem("StealEnemyBlue", "Steal Enemy Blue Buff").SetValue(false));
            buffMenu.AddItem(new MenuItem("StealEnemyRed", "Steal Enemy Red Buff").SetValue(false));
            buffMenu.AddItem(new MenuItem("penissXD", " "));
            Menu.AddSubMenu(buffMenu);

            // Objectives
            var objectiveMenu = new Menu("Objectives", "objectives");
            objectiveMenu.AddItem(new MenuItem("StealDragon", "Steal Dragon").SetValue(true));
            objectiveMenu.AddItem(new MenuItem("StealBaron", "Steal Baron").SetValue(true));
            buffMenu.AddItem(new MenuItem("penisx2 XD", " "));
            Menu.AddSubMenu(objectiveMenu);

            // Kill Stealing
            var ksMenu = new Menu("Kill Stealing", "ks");
            ksMenu.AddItem(new MenuItem("StealKills", "Steal Kills").SetValue(true));
            buffMenu.AddItem(new MenuItem("Line break pls", " "));
            Menu.AddSubMenu(ksMenu);

            // Drawing
            var drawMenu = new Menu("Drawing", "draw");
            drawMenu.AddItem(new MenuItem("DrawStatus", "Draw On").SetValue(true));
            drawMenu.Item("DrawStatus").ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                if (eventArgs.GetNewValue<bool>())
                {
                    Notifications.AddNotification(OnNotification);
                }
                else
                {
                    Notifications.RemoveNotification(OnNotification);
                }
            };
            drawMenu.AddItem(new MenuItem("DrawSpell", "Draw Spell Prediction").SetValue(true));
               // drawMenu.AddItem(new MenuItem("DrawStealInfo", "Draw Steal Information").SetValue(true));
            Menu.AddSubMenu(drawMenu);

            // MISC
            var miscMenu = new Menu("Misc", "misc");
            miscMenu.AddItem(
                new MenuItem("TimeTooLong", "Don't cast spell if time > (MS)").SetValue(new Slider(2500, 0, 10000)));

            Menu.AddItem(new MenuItem("EnabledToggle", "Enabled (Toggle)").SetValue(true));
            Menu.AddItem(new MenuItem("EnabledKeyBind", "Enabled (Press)").SetValue(new KeyBind(90, KeyBindType.Press)));
            Menu.AddSubMenu(miscMenu);

            Menu.AddToMainMenu();

            // Load all champion data
            foreach (var spell in Player.Spellbook.Spells.Where(x => x.Slot == SpellSlot.Q || x.Slot == SpellSlot.W || x.Slot == SpellSlot.E || x.Slot == SpellSlot.R))
            {
                Game.PrintChat("{0}: {1}", spell.Slot, spell.SData.TargettingType);
                var spellData = spell.SData;

                if (spellData.TargettingType == SpellDataTargetType.Self ||
                    spellData.TargettingType == SpellDataTargetType.LocationTunnel ||
                    spellData.TargettingType == SpellDataTargetType.SelfAoe ||
                    spellData.TargettingType == SpellDataTargetType.SelfAndUnit)
                {
                    continue;
                }

                // Check if spell does damage
                if (Math.Abs(Player.GetSpellDamage(Player, spell.Slot)) < 1)
                {
                    continue;
                }

                Menu.SubMenu("buffs").AddItem(new MenuItem("Buffs" + spell.Slot, "Use " + spell.Slot).SetValue(true));
                Menu.SubMenu("objectives").AddItem(new MenuItem("Objective" + spell.Slot, "Use " + spell.Slot).SetValue(true));
                Menu.SubMenu("ks").AddItem(new MenuItem("KillSteal" + spell.Slot, "Use " + spell.Slot).SetValue(spell.Slot != SpellSlot.R));

                Spells.Add(new SpellWrapper(spell.Slot, spellData));
            }

            Game.OnUpdate += GameOnOnUpdate;
            GameObject.OnCreate += GameObjectOnCreate;
            GameObject.OnDelete += GameObjectOnOnDelete;
            Drawing.OnDraw += DrawingOnOnDraw;
            MissileHealthPrediction.Init();

            Game.PrintChat("<font color=\"#7CFC00\"><b>Snitched RELOADED:</b></font> Loaded");
        }
Пример #25
0
 public static void Notif(string msg, int time)
 {
     var x = new Notification("ProjectFiora:  " + msg, time);
     Notifications.AddNotification(x);
 }
Пример #26
0
 /// <summary>
 /// Adds a simple notification to the notification list
 /// </summary>
 /// <param name="text">Display Text</param>
 /// <param name="duration">Duration (-1 for infinite)</param>
 /// <param name="dispose">Dispose upon ending</param>
 /// <returns>Notification.</returns>
 public static Notification AddNotification(string text, int duration = -0x1, bool dispose = true)
 {
     var notification = new Notification(text, duration, dispose);
     NotificationsList.TryAdd(notification.GetId(), notification);
     return notification;
 }
Пример #27
0
 private static void DrawSelectedTarget()
 {
     if (notify)
     {
         var target = TargetSelector.GetSelectedTarget();
         if (target != null)
         {
             if (notifyselected.Text == target.ChampionName)
             {
                 return;
             }
             else
             {
                 Notifications.RemoveNotification(notifyselected);
                 notifyselected = new Notification(target.ChampionName);
                 Notifications.AddNotification(notifyselected);
             }
         }
         else
         {
             if (notifyselected.Text == "null")
             {
                 return;
             }
             else
             {
                 Notifications.RemoveNotification(notifyselected);
                 notifyselected = new Notification("null");
                 Notifications.AddNotification(notifyselected);
             }
         }
     }
     else
     {
         Notifications.RemoveNotification(notifyselected);
     }
 }