Exemple #1
0
            public ChampionTracker(Obj_AI_Hero champion)
            {
                Champion           = champion;
                LastPotion         = champion.ServerPosition;
                StartInvisibleTime = Game.ClockTime;
                var sprite =
                    new Render.Sprite(
                        Helper.ChangeOpacity(
                            Helper.CropCircleImage(
                                (Resources.ResourceManager.GetObject(Champion.ChampionName + "_Square_0") ??
                                 Resources.Katarina_Square_0) as Bitmap), Opacity), new Vector2(0, 0));

                sprite.GrayScale();
                sprite.Scale            = new Vector2(Scale, Scale);
                sprite.VisibleCondition = sender => TrackerCondition;
                sprite.PositionUpdate   =
                    () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2));
                sprite.Add(0);
                Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue <Slider>().Value, Color.White)
                {
                    VisibleCondition = sender => TrackerCondition,
                    PositionUpdate   = () => Drawing.WorldToMinimap(LastPotion),
                    TextUpdate       = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime),
                    OutLined         = true,
                    Centered         = true
                };
                Text.Add(0);
            }
Exemple #2
0
        private void InitDrawing()
        {
            foreach (var h in ObjectManager.Get <Obj_AI_Hero>().Where(h => h.IsEnemy))
            {
                var hero   = h;
                var sprite = new Render.Sprite(Resources.Skull, hero.HPBarPosition);
                sprite.Scale             = new Vector2(0.08f, 0.08f);
                sprite.PositionUpdate   += () => new Vector2(hero.HPBarPosition.X + 140, hero.HPBarPosition.Y + 10);
                sprite.VisibleCondition += s =>
                                           Render.OnScreen(Drawing.WorldToScreen(hero.Position)) &&
                                           GetComboResult(hero).IsKillable&&
                                           _config.Item("icon").GetValue <bool>();
                sprite.Add();

                var text = new Render.Text("", hero, new Vector2(20, 50), 18, new ColorBGRA(255, 255, 255, 255));
                text.VisibleCondition += s => Render.OnScreen(Drawing.WorldToScreen(hero.Position)) && _config.Item("text").GetValue <bool>();
                text.TextUpdate       += () =>
                {
                    var result = GetComboResult(hero);
                    return(result.Text);
                };
                text.OutLined = true;
                text.Add();
            }
        }
Exemple #3
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            recordingbool = false;
            _recordicon   = loadrecordicon();
            Gameregion    = GetGameRegion();
            Game.PrintChat("OP.GG Replay Helper By Seph");
            Config = new Menu("ReplaySharp", "replaysharp", true);
            Config.AddItem(new MenuItem("checkonce", "Only Check Once").SetValue(false));
            Config.AddItem(new MenuItem("Autorecord", "Record all Games").SetValue(false));
            Config.AddItem(new MenuItem("disable", "Disable Record Button").SetValue(false));
            Config.AddItem(new MenuItem("enabledrawings", "Show Drawings").SetValue(true));
            Config.AddItem(new MenuItem("checkuntil", "Check until (mins)").SetValue(new Slider(10, 0, 60)));
            Config.AddToMainMenu();

            playerNameEnc = HttpUtility.UrlEncode(ObjectManager.Player.Name);

            Thread thread = new Thread(() =>
            {
                replaysharp = new ReplaySharp();
            });

            thread.Start();

            if (Config.Item("Autorecord").GetValue <bool>())
            {
                Game.PrintChat("[ReplaySharp] Autorecording is on. Attempting to record the game.");
                recordthis(playerNameEnc.ToLower(), Gameregion);
            }


            Game.OnWndProc += Game_OnWndProc;
        }
Exemple #4
0
            public ChampionTracker(Obj_AI_Hero champion)
            {
                Champion           = champion;
                LastPotion         = champion.ServerPosition;
                StartInvisibleTime = Game.ClockTime;
                var sprite =
                    new Render.Sprite(
                        Helper.ChangeOpacity(
                            ResourceImages.GetChampionSquare(champion.SkinName) ??
                            ResourceImages.GetChampionSquare("Aatrox"), Opacity), new Vector2(0, 0));

                sprite.GrayScale();
                sprite.Scale            = new Vector2(Scale, Scale);
                sprite.VisibleCondition = sender => TrackerCondition;
                sprite.PositionUpdate   =
                    () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2));
                sprite.Add(0);
                Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue <Slider>().Value, Color.White)
                {
                    VisibleCondition = sender => TrackerCondition,
                    PositionUpdate   = () => Drawing.WorldToMinimap(LastPotion),
                    TextUpdate       = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime),
                    OutLined         = true,
                    Centered         = true
                };
                Text.Add(0);
                AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload;
                AppDomain.CurrentDomain.ProcessExit  += CurrentDomainOnDomainUnload;
            }
        public static void InitDeathSprite(OnDeathSprite sprite)
        {
            if (IsDrawing)
            {
                CurrentSprite = null;

                IsDrawing             = false;
                sprite.IsDrawing      = true;
                sprite.Sprite.Visible = false;
                sprite.Sprite.Remove();
            }

            IsDrawing                      = true;
            sprite.IsDrawing               = true;
            sprite.Sprite.Visible          = true;
            sprite.Sprite.Scale            = new Vector2(Scale, Scale);
            sprite.Sprite.VisibleCondition = delegate
            { return(sprite.IsDrawing); };
            sprite.Sprite.Position        = new Vector2(X, Y);
            sprite.Sprite.PositionUpdate += () => new Vector2(X, Y);
            CurrentSprite = sprite.Sprite;
            sprite.Sprite.Add();

            Utility.DelayAction.Add(
                WaifuSharp.Menu.Item("waifusharp.options.duration").GetValue <Slider>().Value, () =>
            {
                CurrentSprite = null;

                IsDrawing             = false;
                sprite.IsDrawing      = true;
                sprite.Sprite.Visible = false;
                sprite.Sprite.Remove();
            });
        }
Exemple #6
0
        /// <summary>
        /// Initializes the sprites.
        /// </summary>
        /// <param name="bypass">if set to <c>true</c> it will bypass the Menu enabled check.</param>
        public static void InitSprites(bool bypass = false)
        {
            try
            {
                if (!MenuExtensions.GetItemValue <bool>("dz191.dza.hud.show") && !bypass)
                {
                    return;
                }

                HudSprite = new Render.Sprite(Resources.TFHelperBG, CurrentPosition)
                {
                    PositionUpdate   = () => CurrentPosition,
                    VisibleCondition = delegate { return(ShouldBeVisible); },
                };
                HudSprite.Crop(0, 0, (int)SpriteWidth, CroppedHeight);

                ExpandShrinkButton = new Render.Sprite(Resources.Expand, CurrentPosition)
                {
                    PositionUpdate   = () => new Vector2(CurrentPosition.X + SpriteWidth - 20, CurrentPosition.Y + CroppedHeight - 20),
                    Scale            = new Vector2(0.7f, 0.7f),
                    VisibleCondition = delegate { return(ShouldBeVisible); }
                };

                ExpandShrinkButton.Add(1);
                HudSprite.Add(0);
            }
            catch (Exception ex)
            {
                LogHelper.AddToLog(new LogItem("Hud_Init", ex, LogSeverity.Error));
            }
        }
Exemple #7
0
        public static void Game_OnGameLoad()
        {
            try
            {
                foreach (var sName in
                         SummonersNames)
                {
                    SummonerTextures.Add(sName, GetSummonerTexture(sName));
                }

                CdFrame   = new Render.Sprite(Resources.hudTRACKER, Vector2.Zero);
                ReadyLine = new Render.Line(Vector2.Zero, Vector2.Zero, 2, Color.Black);
                Text      = new Render.Text("", Vector2.Zero, 13, Color.Black);
            }
            catch (Exception e)
            {
                Console.WriteLine(@"/ff can't load the textures: " + e);
            }
            Drawing.OnPresent   += Drawing_OnEndScene;
            Drawing.OnPreReset  += DrawingOnOnPreReset;
            Drawing.OnPostReset += DrawingOnOnPostReset;
            //       Drawing.OnDraw += Drawing_OnEndScene;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            AppDomain.CurrentDomain.ProcessExit  += CurrentDomain_DomainUnload;
        }
Exemple #8
0
        public CardDrawing(CardsFrame cF, Vector2 extrapos)
        {
            PosCard    = cF.PosDraw + extrapos;
            ActiveCard = Cards.BlueCard;

            BlueCard = new Render.Sprite(Resources.BlaueKarte_jpg, PosCard)
            {
                Scale = new Vector2(0.90f, 0.90f)
            };
            BlueCard.Add();

            RedCard = new Render.Sprite(Resources.RoteKarte_jpg, PosCard)
            {
                Scale = new Vector2(0.90f, 0.90f)
            };

            YellowCard = new Render.Sprite(Resources.GoldeneKarte_jpg, PosCard)
            {
                Scale = new Vector2(0.90f, 0.90f)
            };

            OffCard = new Render.Sprite(Resources.offKarte, PosCard)
            {
                Scale = new Vector2(0.90f, 0.90f)
            };
        }
Exemple #9
0
        public CommonForceUltimate(OlafMenu olafMenu, OlafSpells olafSpells, Orbwalking.Orbwalker orbwalker)
        {
            player = ObjectManager.Player;

            this.olafMenu = olafMenu;
            r             = olafSpells.R;
            olafOrbwalker = orbwalker;

            mouseImage1       = new Render.Sprite(Resources.mouse1, new Vector2(0, 0));
            mouseImage1.Scale = new Vector2(0.50f, 0.50f);
            mouseImage1.Add();

            mouseImage2       = new Render.Sprite(Resources.mouse2, new Vector2(0, 0));
            mouseImage2.Scale = new Vector2(0.50f, 0.50f);
            mouseImage2.Add();

            denyMouseImage       = new Render.Sprite(Resources.denymouse, new Vector2(0, 0));
            denyMouseImage.Scale = new Vector2(0.50f, 0.50f);
            denyMouseImage.Add();
            denyMouseImage.Visible = false;

            Text.Add();
            Text.Visible = false;

            Game.OnWndProc += CheckMouseButtons;
            Game.OnUpdate  += ShowAnimation;
        }
Exemple #10
0
        public RecallInfo(Obj_AI_Hero hero, int index)
        {
            _hero   = hero;
            _index  = index;
            _sprite = new Render.Sprite(Properties.Resources.RecallBar, new Vector2(0, 0))
            {
                Scale            = new Vector2(Program.Instance().BarScale, Program.Instance().BarScale),
                VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000,
                PositionUpdate   =
                    () =>
                    new Vector2(Program.Instance().X, Program.Instance().Y - (_index * TextFont.Description.Height))
            };
            _sprite.Add(0);
            Render.Text heroText = new Render.Text(0, 0, hero.ChampionName, TextFont.Description.Height, Color.White)
            {
                OutLined         = true,
                VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000,
                PositionUpdate   = delegate
                {
                    Rectangle rect = TextFont.MeasureText(null, hero.ChampionName, 0);
                    return(new Vector2(_sprite.X - rect.Width - GapTextBar, _sprite.Y - rect.Height / 2 + (_sprite.Height * Program.Instance().BarScale) / 2));
                }
            };

            heroText.Add(1);
            _countdownText = new Render.Text(0, 0, "", TextFont.Description.Height, Color.White)
            {
                OutLined         = true,
                VisibleCondition = sender => _active
            };
            _countdownText.Add(1);
            Game.OnGameUpdate      += Game_OnGameUpdate;
            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
        }
Exemple #11
0
 public void DrawCircle()
 {
     _circle = new Render.Circle(WardObject.Position, 100, Color, 5, true);
     _circle.VisibleCondition += sender => WardDetector.IsActive() && Render.OnScreen(Drawing.WorldToScreen(WardObject.Position));
     _circle.Add(0);
     if (Type != WardType.Trap)
     {
         _minimapSprite = new Render.Sprite(Bitmap, MinimapPosition)
         {
             Scale = new Vector2(Scale, Scale)
         };
         _minimapSprite.Add(0);
     }
     if (Duration == int.MaxValue)
     {
         return;
     }
     _timerText = new Render.Text(10, 10, "t", 18, new ColorBGRA(255, 255, 255, 255))
     {
         OutLined       = true,
         PositionUpdate = () => Drawing.WorldToScreen(WardObject.Position),
         Centered       = true
     };
     _timerText.VisibleCondition +=
         sender => WardDetector.IsActive() && Render.OnScreen(Drawing.WorldToScreen(WardObject.Position));
     _timerText.TextUpdate = () => Utils.FormatTime((EndTime - Environment.TickCount) / 1000f);
     _timerText.Add(2);
 }
Exemple #12
0
 private void DrawingOnOnDraw(EventArgs args)
 {
     if (_config.Item("Matar_Minion").GetValue <bool>())
     {
         var minionList = MinionManager.GetMinions(Player.Position, GetRealAutoAttackRange(null) + 500, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);
         foreach (var minion in minionList.Where(minion => minion.IsValidTarget(GetRealAutoAttackRange(null) + 500)))
         {
             if (_config.Item("Matar_Minion").GetValue <bool>() && minion.Health <= Player.GetAutoAttackDamage(minion, true))
             {
                 var sprite = new Render.Sprite(Properties.Resources.muerte, minion.HPBarPosition);
                 sprite.Scale             = new Vector2(0.08f, 0.08f);
                 sprite.PositionUpdate   += () => new Vector2(minion.HPBarPosition.X + 140, minion.HPBarPosition.Y + 10);
                 sprite.VisibleCondition += s => _config.Item("Matar_Minion").GetValue <bool>() && minion.Health <= Player.GetAutoAttackDamage(minion, true);
                 sprite.Add();
             }
         }
     }
     if (_config.Item("AACircle2").GetValue <Circle>().Active)
     {
         foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(1500)))
         {
             Render.Circle.DrawCircle(enemy.Position, GetRealAutoAttackRange(enemy), _config.Item("AACircle2").GetValue <Circle>().Color);
         }
     }
     if (_config.Item("AACircle").GetValue <Circle>().Active)
     {
         Render.Circle.DrawCircle(Player.Position, GetRealAutoAttackRange(null) + 65, _config.Item("AACircle").GetValue <Circle>().Color);
     }
 }
Exemple #13
0
        private void InitCircleImage()
        {
            if (ExtendedAwareness.menu.Item("ShowTeamColor").GetValue <bool>() == false)
            {
                return;
            }

            //----------Circle Image
            var circleImage = new Render.Sprite(
                hero.IsAlly ? ImageLoader.circleAllyImg : ImageLoader.circleEnemyImg,
                new Vector2(0, 0));

            circleImage.Scale            = new Vector2(0.5f, 0.5f);
            circleImage.VisibleCondition = sender =>
                                           visiblecond2();

            circleImage.PositionUpdate = delegate
            {
                try
                {
                    circleImage.Scale = imgScale;
                    return(screenPosition);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }

                return(Vector2.Zero);
            };
            circleImage.Add(HeroTracker.layerCount += 0.1f);
        }
        public HeroTracker(AIHeroClient hero, Bitmap bmp)
        {
            Hero = hero;
            var image = new Render.Sprite(bmp, new Vector2(0, 0));

            image.GrayScale();
            image.Scale            = new Vector2(0.5f, 0.5f);
            image.VisibleCondition = sender => !hero.IsHPBarRendered && !hero.IsDead && Misc.isChecked(LastSeenPosition.LastSeenPositionMenu, "drawEnd");
            image.PositionUpdate   = delegate
            {
                var v2 = Drawing.WorldToMinimap(LastLocation);
                v2.X -= image.Width / 2f;
                v2.Y -= image.Height / 2f;
                return(v2);
            };
            image.Add(0);
            LastSeen             = 0;
            LastLocation         = hero.ServerPosition;
            PredictedLocation    = hero.ServerPosition;
            BeforeRecallLocation = hero.ServerPosition;
            Pinged = false;

            Drawing.OnEndScene += LastSeenPosition_OnDraw;
            Game.OnTick        += LastSeenPosition_OnTick;
        }
Exemple #15
0
        /// <summary>
        ///     Method to display a banner and a text
        /// </summary>
        /// <param name="name">Name of the assembly</param>
        /// <param name="version">Version of the assembly</param>
        /// <param name="displayTime">Time of displaying</param>
        private static void DrawBanner(String name, int version, int displayTime)
        {
            LeagueSharp.Common.Notifications.AddNotification(
                String.Format("[{0}] {1} - loaded successfully!", name, version),
                displayTime,
                true);

            if (Game.Time <= 6000000)
            {
                var banner = new Render.Sprite(Resources.BannerLoading, new Vector2())
                {
                    Scale =
                        new Vector2(
                            1 / (Drawing.Width / 3),
                            1 / (Drawing.Height / 3))
                        .Normalized()
                };

                // centered but a little above the screens center

                var position = new Vector2(
                    (Drawing.Width / 2) - banner.Width / 2,
                    (Drawing.Height / 2) - banner.Height / 2 - 50);
                banner.Position = position;

                banner.Add(0);

                banner.OnDraw();

                //LeagueSharp.Common.Utility.DelayAction.Add(displayTime, () => banner.Remove());
            }
        }
Exemple #16
0
        private static void Sprite_OnReset(Render.Sprite sprite)
        {
            int w = sprite.Width;

            sprite.Scale = _scale;
            Crop(sprite, w == 85);
        }
Exemple #17
0
 public static bool LoadTexture(String name, ref Render.Sprite texture, DownloadType type)
 {
     try
     {
         Bitmap map;
         if (!cachedMaps.ContainsKey(name))
         {
             map = DownloadImage(name, type);
             cachedMaps.Add(name, (Bitmap)map.Clone());
         }
         else
         {
             map = new Bitmap((Bitmap)cachedMaps[name].Clone());
         }
         if (map == null)
         {
             texture = new Render.Sprite(MyResources["questionmark"], new Vector2(0, 0));
             Console.WriteLine("SAwarness: " + name + " is missing. Please inform Screeder!");
             return(false);
         }
         texture = new Render.Sprite(map, new Vector2(0, 0));
         //texture.UpdateTextureBitmap(map);
         return(true);
         //texture = new Render.Sprite(map, new Vector2(0, 0));
     }
     catch (Exception ex)
     {
         Console.WriteLine("SAwarness: Couldn't load texture: " + name + "\n Ex: " + ex);
         return(false);
     }
 }
Exemple #18
0
        private static Render.Sprite loadrecordicon()
        {
            _posrecord = GetScaledVector(_posrecord);

            var loadrecord = new Render.Sprite(Resources.record, _posrecord)
            {
                Scale = Scale,
                Color = new ColorBGRA(255f, 255f, 255f, 20f)
            };

            loadrecord.Position = GetPosition(loadrecord.Width - 826);
            loadrecord.Show();
            loadrecord.VisibleCondition += s => recordingbool;
            loadrecord.Add(0);


            _posrecord = GetScaledVector(_posrecord);

            var loadrecord2 = new Render.Sprite(Resources.disabled2, _posrecord)
            {
                Scale = Scale,
                Color = new ColorBGRA(255f, 255f, 255f, 20f)
            };

            loadrecord2.Position = GetPosition(loadrecord2.Width - 826);
            loadrecord2.Show();
            loadrecord2.VisibleCondition += s => !recordingbool;
            loadrecord2.Add(0);


            return(loadrecord);
        }
Exemple #19
0
        private static bool MouseOnButton(Render.Sprite button)
        {
            Vector2 pos = Utils.GetCursorPos();

            return((pos.X >= button.Position.X) && pos.X <= (button.Position.X + button.Width) &&
                   pos.Y >= button.Position.Y && pos.Y <= (button.Position.Y + button.Height));
        }
Exemple #20
0
        public AnnieButtons(Annie annie)
        {
            this.annie = annie;

            ShowEasyButton = (KoreanUtils.GetParamBool(annie.MainMenu, "showeeasybutton"));

            int posX = KoreanUtils.GetParamInt(annie.MainMenu, "easybuttonpositionx");

            posX = (posX == 0) ? 50 : posX;
            int posY = KoreanUtils.GetParamInt(annie.MainMenu, "easybuttonpositiony");

            posY = (posY == 0) ? 50 : posY;
            Vector2 pos = new Vector2(posX, posY);

            StunButtonOn       = new Render.Sprite(Resources.StunON, pos);
            StunButtonOn.Scale = new Vector2(0.90f, 0.90f);
            StunButtonOn.Add();

            StunButtonOff       = new Render.Sprite(Resources.StunOFF, pos);
            StunButtonOff.Scale = new Vector2(0.90f, 0.90f);
            StunButtonOff.Add();

            if (ShowEasyButton)
            {
                StunButtonOn.Visible  = KoreanUtils.GetParamBool(annie.MainMenu, "savestunforcombo");
                StunButtonOff.Visible = !StunButtonOn.Visible;
            }

            KoreanUtils.GetParam(annie.MainMenu, "savestunforcombo").ValueChanged += SaveStunForComboValueChanged;
            Game.OnWndProc += ButtonControl;
        }
Exemple #21
0
        private static void Main(string[] args)
        {
            Leaguesharpicon = loadleaguesharp();

            CustomEvents.Game.OnGameLoad += onGameLoad;
            Game.OnWndProc += Game_OnWndProc;
        }
Exemple #22
0
 public static void LoadTexture(Bitmap map, ref Render.Sprite texture)
 {
     if (texture == null)
     {
         texture = new Render.Sprite(MyResources["questionmark"], new Vector2(0, 0));
     }
     texture.UpdateTextureBitmap(map);
 }
Exemple #23
0
        public void LoadOKTW()
        {
            (Config["aboutoktw"] as Menu).Add(new MenuBool("logo", "Intro logo OKTW", true));

            if (Config["aboutoktw"].GetValue <MenuBool>("logo").Value)
            {
                Intro = new Render.Sprite(LoadImg("intro"), new Vector2(Drawing.Width / 2 - 500, Drawing.Height / 2 - 350));
                Intro.Add(0);
                Intro.OnDraw();
            }

            DelayAction.Add(7000, () => Intro.Remove());

            var ud = Config["utilitydraws"] as Menu;

            ud.Add(new MenuBool("disableDraws", "DISABLE UTILITY DRAWS"));

            var eig = new Menu("enemyinfogrid", "Enemy info grid");

            eig.Add(new MenuBool("championInfo", "Game Info", true));
            eig.Add(new MenuBool("ShowKDA", "Show flash and R CD", true));
            eig.Add(new MenuBool("ShowRecall", "Show recall", true));
            eig.Add(new MenuSlider("posX", "posX", 70, 0, 100));
            eig.Add(new MenuSlider("posY", "posY", 10, 0, 100));
            ud.Add(eig);

            ud.Add(new MenuBool("GankAlert", "Gank Alert", true));
            ud.Add(new MenuBool("HpBar", "Dmg indicators BAR OKTW© style", true));
            ud.Add(new MenuBool("ShowClicks", "Show enemy clicks", true));
            ud.Add(new MenuBool("SS", "SS notification", true));
            ud.Add(new MenuBool("RF", "R and Flash notification", true));
            ud.Add(new MenuBool("showWards", "Show hidden objects, wards", true));
            ud.Add(new MenuBool("minimap", "Mini-map hack", true));

            Tahoma13B = new Font(Drawing.Direct3DDevice, new FontDescription
            {
                FaceName = "Tahoma", Height = 14, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType
            });

            Tahoma13 = new Font(Drawing.Direct3DDevice, new FontDescription
            {
                FaceName = "Tahoma", Height = 14, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType
            });

            TextBold = new Font(Drawing.Direct3DDevice, new FontDescription
            {
                FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType
            });

            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W);
            E = new Spell(SpellSlot.E);
            R = new Spell(SpellSlot.R);

            Drawing.OnEndScene += Drawing_OnEndScene;
            Drawing.OnDraw     += Drawing_OnDraw;
        }
Exemple #24
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Co = new Render.Sprite(LoadImg("intro"), new Vector2(100, 100));
            Co.Add(0);



            Game.OnUpdate += Game_OnUpdate;
        }
Exemple #25
0
        public static void Initialize()
        {
            AdSprite = new Render.Sprite(Properties.Resources.PopBlanc, AdPosition);
            AdSprite.Add();

            adDisplayed = LeagueSharp.Common.Utils.TickCount;

            Game.OnUpdate  += Game_OnUpdate;
            Game.OnWndProc += Game_OnWndProc;
        }
        /// <summary>
        /// Initializes the sprite reference. To be called when the assembly is loaded.
        /// </summary>
        internal static void InitalizeSprite()
        {
            sprite = new Render.Sprite(Properties.Resources.ScopeSprite, new Vector2());
            {
                sprite.Scale            = new Vector2(1.0f, 1.0f);
                sprite.PositionUpdate   = () => RTargetPosition;
                sprite.VisibleCondition = s => DrawCondition;
            }

            sprite.Add();
        }
Exemple #27
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            config = new Menu("Custom Overlay", "Custom Overlay", true);
            config.AddItem(new MenuItem("slider", "Choose Overlay").SetValue(new Slider(1, 1, 42)));

            sprite = new Render.Sprite(Properties.Resources.hud_1, new Vector2(1, 1));
            sprite.Add(0);

            Game.PrintChat("<font color='#FF00BF'>Custom Overlay Loaded By</font> <font color='#FF0000'>The</font><font color='#FFFF00'>Kush</font><font color='#40FF00'>Style</font>");

            Game.OnGameUpdate += OnGameUpdate;
        }
Exemple #28
0
        public HeroHudImage(string name)
        {
            this.HeroSprite = new Render.Sprite(ImageLoader.Load(name), new Vector2(0, 0))
            {
                Scale            = new Vector2(0.38f, 0.38f),
                Visible          = true,
                VisibleCondition = delegate { return(HudDisplay.ShouldBeVisible); },
            };

            //image.GrayScale();
            HeroSprite.Add(1);
        }
Exemple #29
0
        private static Render.Sprite loadFrame()
        {
            var load = new Render.Sprite(Resources.tsframe, new SharpDX.Vector2(0, 0))
            {
                Color = new ColorBGRA(255f, 255f, 255f, 20f)
            };

            load.Position = new Vector2((int)(Drawing.Width * 0.628), (int)(Drawing.Height - 102));
            load.Show();
            load.Add(0);
            return(load);
        }
Exemple #30
0
        private static Render.Sprite GetMapSprite(string name, Vector2 pos)
        {
            Stream stream = GetBitmapStream(name);
            var    sprite = new Render.Sprite(stream, pos)
            {
                Scale = _scale
            };

            sprite.OnReset += Sprite_OnReset;
            Crop(sprite, IsMajorCamp(name));
            return(sprite);
        }
Exemple #31
0
        public void LoadOKTW()
        {
            Config.SubMenu("About OKTW©").AddItem(new MenuItem("logo", "Intro logo OKTW").SetValue(true));

            if (Config.Item("logo").GetValue<bool>())
            {
                Intro = new Render.Sprite(LoadImg("intro"), new Vector2((Drawing.Width / 2) - 500, (Drawing.Height / 2) - 350));
                Intro.Add(0);
                Intro.OnDraw();
            }

            Utility.DelayAction.Add(7000, () => Intro.Remove());


            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("disableDraws", "Disable Utility draws").SetValue(false));
            //Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("disableChampion", "Disable AIO champion (utility mode only) need F5").SetValue(false));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Draw AAcirlce OKTW© style").AddItem(new MenuItem("OrbDraw", "Draw AAcirlce OKTW© style").SetValue(false));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Draw AAcirlce OKTW© style").AddItem(new MenuItem("orb", "Orbwalker target OKTW© style").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Draw AAcirlce OKTW© style").AddItem(new MenuItem("1", "pls disable Orbwalking > Drawing > AAcirlce"));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("Draw AAcirlce OKTW© style").AddItem(new MenuItem("2", "My HP: 0-30 red, 30-60 orange,60-100 green"));

            Config.SubMenu("Utility, Draws OKTW©").SubMenu("ChampionInfo").AddItem(new MenuItem("championInfo", "Game Info").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("ChampionInfo").AddItem(new MenuItem("ShowKDA", "Show flash and R info").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("ChampionInfo").AddItem(new MenuItem("GankAlert", "Gank Alert").SetValue(true));

            Config.SubMenu("Utility, Draws OKTW©").SubMenu("ChampionInfo").AddItem(new MenuItem("posX", "posX").SetValue(new Slider(20, 100, 0)));
            Config.SubMenu("Utility, Draws OKTW©").SubMenu("ChampionInfo").AddItem(new MenuItem("posY", "posY").SetValue(new Slider(10, 100, 0)));

            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("HpBar", "Dmg indicators BAR OKTW© style").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("ShowClicks", "Show enemy clicks").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("SS", "SS notification").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("showWards", "Show hidden objects, wards").SetValue(true));
            Config.SubMenu("Utility, Draws OKTW©").AddItem(new MenuItem("minimap", "Mini-map hack").SetValue(true));
            if (Program.AIOmode != 2)
            {
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarm", "OKTW spells farm").SetValue(true)).Show();
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmMode", "SPELLS FARM TOGGLE MODE").SetValue(new StringList(new[] { "Scroll down", "Scroll press", "Key toggle", "Disable" }, 1)));
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("spellFarmKeyToggle", "Key toggle").SetValue(new KeyBind("N".ToCharArray()[0], KeyBindType.Toggle)));
                Config.SubMenu(Player.ChampionName).SubMenu("Farm").SubMenu("SPELLS FARM TOGGLE").AddItem(new MenuItem("showNot", "Show notification").SetValue(true));
                Config.Item("spellFarm").Permashow(true);
            }
            Tahoma13B = new Font( Drawing.Direct3DDevice, new FontDescription
               { FaceName = "Tahoma", Height = 14, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });

            Tahoma13 = new Font( Drawing.Direct3DDevice, new FontDescription
                { FaceName = "Tahoma", Height = 14, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType });

            TextBold = new Font(Drawing.Direct3DDevice, new FontDescription
                {FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType});

            Q = new Spell(SpellSlot.Q);
            E = new Spell(SpellSlot.E);
            W = new Spell(SpellSlot.W);
            R = new Spell(SpellSlot.R);



            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Game.OnWndProc += Game_OnWndProc;

        }