示例#1
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();
            }
        }
示例#2
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);
 }
示例#3
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(HudVariables.ShouldBeVisible); },
            };

            this.SSSprite = new Render.Sprite(Resources.SSCircle, new Vector2(0, 0))
            {
                Scale   = new Vector2(0.38f, 0.38f),
                Visible = true,
            };

            this.SSText = new Render.Text(new Vector2(0, 0), "", 26, SharpDX.Color.White)
            {
                Visible  = true,
                Centered = true
            };

            //image.GrayScale();
            HeroSprite.Add(1);
            SSSprite.Add(2);
            SSText.Add(3);
        }
示例#4
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;
        }
示例#5
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);
            }
示例#6
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            foreach (var name in Names)
            {
                var text = TextDictionary[name];
                var unit = FindUnit(name);

                if (unit == null)
                {
                    continue;
                }

                if (text == null || text.Unit == null)
                {
                    Utility.DebugMessage("FOUND: " + name);
                    var rText = new Render.Text(
                        unit.Health.ToString(), unit, new Vector2(5, -10), 45, SharpDX.Color.Blue, "Helvetica");
                    rText.Add();
                    TextDictionary.Add(name, rText);
                    continue;
                }

                if (text.Unit.IsDead)
                {
                    Utility.DebugMessage("REMOVED: " + name);
                    text.Dispose();
                    TextDictionary.Remove(name);
                    continue;
                }

                text.text = unit.Health.ToString();
            }
        }
示例#7
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;
        }
示例#8
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            foreach (var c in
                     ControllerArray.Select(controlId => new Controller((UserIndex)controlId)).Where(c => c.IsConnected))
            {
                Controller = new GamepadState(c.UserIndex);
            }

            if (Controller == null || !Controller.Connected)
            {
                Game.PrintChat("No controller detected!");
                return;
            }

            Menu      = new Menu("ControllerTest", "ControllerTest", true);
            OrbWalker = new Orbwalking.Orbwalker(Menu);
            Menu.AddItem(new MenuItem("Draw", "Draw Circle").SetValue(true));
            Menu.AddToMainMenu();

            if (Menu.Item("Draw").GetValue <bool>())
            {
                CurrentPosition = new Render.Circle(ObjectManager.Player.Position, 100, Color.Red, 2);
                CurrentPosition.Add();
                Text          = new Render.Text(new Vector2(50, 50), "MODE: " + CurrentMode, 30, new ColorBGRA(255, 0, 0, 255));
                Text.OutLined = true;
                Text.Add();
            }

            Utility.DebugMessage(
                "<b><font color =\"#FFFFFF\">ControlSharp by </font><font color=\"#5C00A3\">Trees</font><font color =\"#FFFFFF\"> loaded!</font></b>");

            Menu.Item("Draw").ValueChanged += OnValueChanged;
            Game.OnGameUpdate += Game_OnGameUpdate;
        }
示例#9
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;
            }
示例#10
0
 public Jungler()
 {
     foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>())
     {
         if (hero.IsEnemy && hero.Spellbook.Spells.Find(inst => inst.Name.ToLower().Contains("smite")) != null)
         {
             HeroJungler = hero;
             Render.Text text = new Render.Text(Drawing.Width / 2, Drawing.Height / 2 + 400, "", 20, Color.AliceBlue);
             text.TextUpdate = delegate
             {
                 if (targeting)
                 {
                     return(MapPositions.GetRegion(hero.ServerPosition.To2D()).ToString() +
                            "\nJungler is targeting you. CARE!");
                 }
                 return(MapPositions.GetRegion(hero.ServerPosition.To2D()).ToString());
             };
             text.VisibleCondition = sender =>
             {
                 return(IsActive() && hero.IsVisible && !hero.IsDead);
             };
             text.OutLined = true;
             text.Centered = true;
             text.Add();
         }
     }
     Obj_AI_Base.OnIssueOrder += Obj_AI_Base_OnIssueOrder;
 }
示例#11
0
文件: Program.cs 项目: jayblah/Trees
        private static void OnGameLoad(EventArgs args)
        {
            if (!ThreshInGame())
            {
                return;
            }

            Menu = new Menu("AutoLantern", "AutoLantern", true);
            Menu.AddItem(new MenuItem("Auto", "Auto-Lantern at Low HP").SetValue(true));
            Menu.AddItem(new MenuItem("Low", "Low HP Percent").SetValue(new Slider(20, 10, 50)));
            Menu.AddItem(new MenuItem("Hotkey", "Hotkey").SetValue(new KeyBind(32, KeyBindType.Press)));
            Menu.AddItem(new MenuItem("Draw", "Draw Helper Text").SetValue(true));
            Menu.AddToMainMenu();

            LanternText = new Render.Text(
                "Click Lantern", Drawing.Width / 2 - Drawing.Width / 3, Drawing.Height / 2 + Drawing.Height / 3, 28,
                Color.Red, "Verdana")
            {
                VisibleCondition = sender => Menu.Item("Draw").IsActive()
            };

            LanternText.Add();

            Game.OnUpdate += OnGameUpdate;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
        }
示例#12
0
 public ChampSkin(int id, String name)
 {
     Id   = id;
     Name = new Render.Text(0, 0, name, 18, SharpDX.Color.Orange);
     Name.PositionUpdate = delegate
     {
         if (SpriteInfoSmall == null || SpriteInfoSmall.Sprite == null || SpriteInfoBig.Sprite == null)
         {
             return(new Vector2(-50, -50));
         }
         if (SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameSplash").GetValue <bool>())
         {
             return(new Vector2(SpriteInfoBig.Sprite.Position.X + SpriteInfoBig.Sprite.Width / 2, SpriteInfoBig.Sprite.Position.Y - 18));
         }
         else
         {
             return(new Vector2(SpriteInfoSmall.Sprite.Position.X + SpriteInfoSmall.Sprite.Width / 2, SpriteInfoSmall.Sprite.Position.Y - 18));
         }
     };
     Name.VisibleCondition = sender =>
     {
         return(Misc.Miscs.GetActive() && SkinChangerMisc.GetActive() && SkinChangerMisc.GetMenuItem("SAssembliesMiscsSkinChangerSkinNameLoading").GetValue <bool>() && Active);
     };
     Name.OutLined = true;
     Name.Centered = true;
     Name.Add(4);
 }
示例#13
0
 /// <summary>
 /// Raises the <see cref="E:Ping" /> event.
 /// </summary>
 /// <param name="args">The <see cref="GamePingEventArgs"/> instance containing the event data.</param>
 private void OnPing(GamePingEventArgs args)
 {
     if (!args.Source.IsMe && ShouldRun() && (args.Source is Obj_AI_Hero))
     {
         var pingType = args.PingType;
         var srcHero  = args.Source as Obj_AI_Hero;
         if (pingType == PingCategory.Normal)
         {
             var textObject = new Render.Text(
                 srcHero.ChampionName,
                 new Vector2(
                     Drawing.WorldToScreen(args.Position.To3D()).X,
                     Drawing.WorldToScreen(args.Position.To3D()).Y + 15), 17, SharpDX.Color.White)
             {
                 PositionUpdate = () => new Vector2(
                     Drawing.WorldToScreen(args.Position.To3D()).X,
                     Drawing.WorldToScreen(args.Position.To3D()).Y + 30),
                 Centered = true
             };
             textObject.Add(0);
             LeagueSharp.Common.Utility.DelayAction.Add(1000, () =>
             {
                 textObject.Remove();
             });
         }
     }
 }
示例#14
0
 public AscensionObject(Obj_AI_Minion obj)
 {
     Obj = obj;
     if (obj != null && obj.IsValid)
     {
         Position = obj.Position;
     }
     else
     {
         Position = new Vector3();
     }
     SpawnTime = (int)Game.ClockTime;
     MapType   = Utility.Map.MapType.CrystalScar;
     if (obj.Name.Contains("AscRelic"))
     {
         RespawnTime = 30;
     }
     else if (obj.Name.Contains("OdinShieldRelic"))
     {
         RespawnTime = 32;
     }
     Locked      = false;
     Called      = false;
     TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value, new ColorBGRA(Color4.White));
     Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += HealthObject_ValueChanged;
     TextMinimap.TextUpdate = delegate
     {
         return((NextRespawnTime - (int)Game.ClockTime).ToString());
     };
     TextMinimap.PositionUpdate = delegate
     {
         Vector2 sPos = Drawing.WorldToMinimap(Position);
         return(new Vector2(sPos.X, sPos.Y));
     };
     TextMinimap.VisibleCondition = sender =>
     {
         return(IsActive() && (NextRespawnTime - (int)Game.ClockTime) > 0 && MapType == GMap.Type);
     };
     TextMinimap.OutLined = true;
     TextMinimap.Centered = true;
     TextMinimap.Add();
     TextMap            = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value * 3.5), new ColorBGRA(Color4.White));
     TextMap.TextUpdate = delegate
     {
         return((NextRespawnTime - (int)Game.ClockTime).ToString());
     };
     TextMap.PositionUpdate = delegate
     {
         Vector2 sPos = Drawing.WorldToScreen(Position);
         return(new Vector2(sPos.X, sPos.Y));
     };
     TextMap.VisibleCondition = sender =>
     {
         return(IsActive() && (NextRespawnTime - (int)Game.ClockTime) > 0 && MapType == GMap.Type);
     };
     TextMap.OutLined = true;
     TextMap.Centered = true;
     TextMap.Add();
 }
示例#15
0
        private static Render.Text loadText(string text, ColorBGRA color)
        {
            var load = new Render.Text(new Vector2(0, 0), text, 15, color,
                                       "Calibri");

            load.Add(0);
            return(load);
        }
示例#16
0
        private void Init()
        {
            foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>())
            {
                if (!hero.IsEnemy)
                {
                    continue;
                }
                bool hasSmite = false;
                foreach (SpellDataInst spell in hero.Spellbook.Spells)
                {
                    if (spell.Slot.HasFlag(SpellSlot.Summoner1 | SpellSlot.Summoner2))
                    {
                        if (spell.Name.ToLower().Contains("smite"))
                        {
                            hasSmite = true;
                            break;
                        }
                    }
                }
                if (hasSmite)
                {
                    Render.Text text = new Render.Text(new Vector2(0, 0), hero.IsEnemy ? Language.GetString("DETECTORS_GANK_TEXT_JUNGLER_ENEMY") :
                                                       Language.GetString("DETECTORS_GANK_TEXT_JUNGLER_ALLY"), 28, hero.IsEnemy ? Color.Red : Color.Green);
                    text.PositionUpdate = delegate
                    {
                        return(Drawing.WorldToScreen(ObjectManager.Player.ServerPosition));
                    };
                    text.VisibleCondition = sender =>
                    {
                        return(IsVisible(hero));
                    };
                    text.OutLined = true;
                    text.Centered = true;
                    text.Add();
                    Render.Line line = new Render.Line(new Vector2(1, 1), new Vector2(1, 1), 4, hero.IsEnemy ? Color.Red : Color.Green);
                    line.StartPositionUpdate = delegate
                    {
                        return(Drawing.WorldToScreen(ObjectManager.Player.ServerPosition));
                    };
                    line.EndPositionUpdate = delegate
                    {
                        return(Drawing.WorldToScreen(hero.ServerPosition));
                    };
                    line.VisibleCondition = sender =>
                    {
                        return(IsVisible(hero));
                    };
                    line.Add();

                    Enemies.Add(hero, new InternalGankDetector(text, line));
                }
                else
                {
                    Enemies.Add(hero, new InternalGankDetector(null, null));
                }
            }
        }
示例#17
0
        private static Render.Text GetRenderText(Vector2 pos, bool isMajor)
        {
            Vector2 offset = isMajor ? MajorCampTextOffset : MinorCampTextOffset;
            int     size   = isMajor ? 48 : 42;
            var     text   = new Render.Text("", (int)(pos.X + offset.X), (int)(pos.Y + offset.Y), size, Color.White);

            text.Add(1);
            return(text);
        }
示例#18
0
        public static void InitDrawing(Spell y)
        {
            var text = new Render.Text("", Player, new Vector2(20, 50), 18, new ColorBGRA(255, 255, 255, 255));

            if (Render.OnScreen(Drawing.WorldToScreen(Player.Position)) && menu.Item("Enabled").GetValue <bool>() == true)
            {
                ;
            }
            {
                text.Visible = true;
            }
            text.TextUpdate += () =>
            {
                if (menu.Item("Enabled").GetValue <bool>() == false)
                {
                    return("");
                }

                else if (Player.BaseSkinName == "Kennen" && CheckForMinions(y) == false && CheckForEnemies(y))
                {
                    return("Enemies have been found!");
                }
                else if (Player.BaseSkinName != "Kennen" && CheckForEnemies(y))
                {
                    return("Enemies have been found!");
                }
                else if (y.Level == 0)
                {
                    if (Player.Level >= 3 && Player.BaseSkinName == "Kennen")
                    {
                        return("You should get your spell.");
                    }
                    if (Player.Level >= 1 && Player.BaseSkinName == "Evelynn")
                    {
                        return("You should get your spell.");
                    }
                    else if (Player.Level > 6)
                    {
                        return("Do you play on getting your damn spell?");
                    }
                    else
                    {
                        return("Spell not acquired.");
                    }
                }


                else
                {
                    return("");
                }
            };


            text.OutLined = true;
            text.Add();
        }
示例#19
0
        private void Init()
        {
            if (!IsActive())
            {
                return;
            }

            foreach (Obj_BarracksDampener inhibitor in ObjectManager.Get <Obj_BarracksDampener>())
            {
                int         health = 0;
                Render.Text Text   = new Render.Text(0, 0, "", 14, new ColorBGRA(Color4.White));
                Text.TextUpdate = delegate
                {
                    if (!inhibitor.IsValid)
                    {
                        return("");
                    }
                    var mode =
                        Health.Healths.GetMenuItem("SAssembliesHealthsMode")
                        .GetValue <StringList>();
                    switch (mode.SelectedIndex)
                    {
                    case 0:
                        health = (int)((inhibitor.Health / inhibitor.MaxHealth) * 100);
                        break;

                    case 1:
                        health = (int)inhibitor.Health;
                        break;
                    }
                    return(health.ToString());
                };
                Text.PositionUpdate = delegate
                {
                    if (!inhibitor.IsValid)
                    {
                        return(new Vector2(0, 0));
                    }
                    Vector2 pos = Drawing.WorldToMinimap(inhibitor.Position);
                    return(new Vector2(pos.X, pos.Y));
                };
                Text.VisibleCondition = sender =>
                {
                    if (!inhibitor.IsValid)
                    {
                        return(false);
                    }
                    return(IsActive() && inhibitor.IsValid && !inhibitor.IsDead && inhibitor.IsValid && inhibitor.Health > 0.1f &&
                           ((inhibitor.Health / inhibitor.MaxHealth) * 100) != 100);
                };
                Text.OutLined = true;
                Text.Centered = true;
                Text.Add();

                healthConf.Add(new Health.HealthConf(inhibitor, Text));
            }
        }
        private void InitTurrentHealth() //TODO: Draw HP above BarPos
        {
            if (!IsActive())
            {
                return;
            }

            foreach (Obj_AI_Turret turret in ObjectManager.Get <Obj_AI_Turret>())
            {
                int health = 0;
                var mode   =
                    Health.Healths.GetMenuItem("SAssembliesHealthsMode")
                    .GetValue <StringList>();
                Render.Text Text = new Render.Text(0, 0, "", 14, new ColorBGRA(Color4.White));
                Text.TextUpdate = delegate
                {
                    if (!turret.IsValid)
                    {
                        return("");
                    }
                    switch (mode.SelectedIndex)
                    {
                    case 0:
                        health = (int)((turret.Health / turret.MaxHealth) * 100);
                        break;

                    case 1:
                        health = (int)turret.Health;
                        break;
                    }
                    return(health.ToString());
                };
                Text.PositionUpdate = delegate
                {
                    if (!turret.IsValid)
                    {
                        return(new Vector2(0, 0));
                    }
                    Vector2 pos = Drawing.WorldToMinimap(turret.Position);
                    return(new Vector2(pos.X, pos.Y));
                };
                Text.VisibleCondition = sender =>
                {
                    if (!turret.IsValid)
                    {
                        return(false);
                    }
                    return(Health.Healths.GetActive() && TurretHealth.GetActive() && turret.IsValid && !turret.IsDead && turret.IsValid && turret.Health != 9999 &&
                           ((turret.Health / turret.MaxHealth) * 100) != 100);
                };
                Text.OutLined = true;
                Text.Centered = true;
                Text.Add();

                healthConf.Add(new Health.HealthConf(turret, Text));
            }
        }
示例#21
0
        public static void Initialize()
        {
            Menu.AddCircle("DrawWolfAARange", "Draw Wolf AA Range", Color.Purple);
            Menu.AddBool("DrawWolfTime", "Draw Wolf Time");
            Menu.AddBool("DrawWStacks", "Draw W Passive (Max Stacks)");

            GameObject.OnCreate += GameObject_OnCreate;
            GameObject.OnDelete += GameObject_OnDelete;
            Drawing.OnDraw      += Drawing_OnDraw;

            HealText = new Render.Text("", 0, 0, 20, SharpDX.Color.Green);
            HealText.VisibleCondition += sender => Menu.Item("DrawWStacks").IsActive() && IsWPassiveReady();
            HealText.PositionUpdate   += () =>
            {
                var pos = Drawing.WorldToScreen(ObjectManager.Player.Position);
                if (Wolf != null && Wolf.IsValid && Wolf.IsVisible)
                {
                    pos = Drawing.WorldToScreen(Wolf.Position);
                }
                return(pos + new Vector2(-35, 20));
            };
            HealText.TextUpdate         += () => "Heal Ready (" + GetWPassiveHeal() + ")";
            HealText.TextFontDescription = new FontDescription
            {
                FaceName        = "Calibri",
                Height          = 20,
                OutputPrecision = FontPrecision.TrueType,
                Quality         = FontQuality.Antialiased
            };
            HealText.Add();

            TimeText = new Render.Text("", 0, 0, 40, Color.Purple.ToBGRA());
            TimeText.VisibleCondition +=
                sender => Menu.Item("DrawWolfTime").IsActive() && Wolf != null && Wolf.IsValid && Wolf.IsVisible;
            TimeText.PositionUpdate += () => Wolf.HPBarPosition + new Vector2(30, -10);
            TimeText.TextUpdate     += () =>
            {
                var timeSpawned = Utils.TickCount - WolfSpawnTime;
                var timeLeft    = Math.Round((8000 - timeSpawned) / 1000f, 1, MidpointRounding.ToEven);
                if (timeLeft < 0)
                {
                    return("");
                }
                var time = timeLeft.ToString();
                return(time.Substring(0, time.Length > 3 ? 3 : time.Length));
            };
            TimeText.TextFontDescription = new FontDescription
            {
                FaceName        = "Calibri",
                Height          = 40,
                OutputPrecision = FontPrecision.TrueType,
                Quality         = FontQuality.Antialiased
            };
            TimeText.Add();
        }
示例#22
0
            public Status()
            {
                status = new Render.Text("", new Vector2(Drawing.Width * 20 / 100, Drawing.Width - 100), (int)12, ColorBGRA.FromRgba(0xFFFFFFFF))
                {
                    VisibleCondition = c => true,
                    PositionUpdate   = () => new Vector2(Drawing.Width * (getMenuValue("x%") / 100f) + (order * 12), Drawing.Height * (getMenuValue("y%") / 100f)),
                    text             = "■",
                };

                status.Add();
            }
示例#23
0
 public DrawText(JungleCamp pos)
 {
     Text = new Render.Text(Drawing.WorldToMinimap(pos.Position), "", 15, SharpDX.Color.White)
     {
         VisibleCondition = sender => (pos.NextRespawnTime > 0),
         TextUpdate       = () => FormatTime(pos.NextRespawnTime - (int)Game.ClockTime),
     };
     JungleCamp = pos;
     Text.Add(_layer);
     _layer++;
 }
示例#24
0
        private static Render.Text RenderText(string text, bool isTop, int indexof, int toffset, Color2 color)
        {
            int       ystart   = isTop ? 15 + toffset : 411 + toffset;
            const int size     = 20;
            int       xformula = isTop ? 210 + (indexof * 200) : 210 + ((indexof - 5) * 200);
            var       texty    = new Render.Text(text, xformula, ystart, size, color);

            texty.VisibleCondition = sender => !disabletext;
            texty.Add(1);
            return(texty);
        }
示例#25
0
        public Immune()
        {
            //Immune
            Abilities.Add(new Ability("zhonyas_ring_activate", 2.5f, "Zhonyas"), null);
            Abilities.Add(new Ability("Aatrox_Passive_Death_Activate", 3f, "Aatrox Passive"), null);
            Abilities.Add(new Ability("LifeAura", 4f, "Ressurection"), null); //Zil und GA
            Abilities.Add(new Ability("nickoftime_tar", 7f, "Zilean Ult"), null);
            Abilities.Add(new Ability("eyeforaneye", 2f, "Kayle Ult"), null);
            Abilities.Add(new Ability("UndyingRage_buf", 5f, "Tryndamere Ult"), null);
            Abilities.Add(new Ability("EggTimer", 6f, "Anivia Egg"), null);
            Abilities.Add(new Ability("LOC_Suppress", 1.75f, ""), null);
            Abilities.Add(new Ability("OrianaVacuumIndicator", 0.50f, "Orianna R"), null);
            Abilities.Add(new Ability("NocturneUnspeakableHorror_beam", 2f, "Nocturn W"), null);
            Abilities.Add(new Ability("GateMarker_green", 1.5f, ""), null);
            Abilities.Add(new Ability("Zed_Ult_TargetMarker_tar", 3.0f, "Zed Ult"), null);

            foreach (var ability in Abilities.ToList())
            {
                Render.Text text = new Render.Text(new Vector2(0, 0), "", 28, SharpDX.Color.Goldenrod);
                text.OutLined   = true;
                text.Centered   = true;
                text.TextUpdate = delegate
                {
                    float endTime = ability.Key.TimeCasted - (int)Game.ClockTime + ability.Key.Delay;
                    var   m       = (float)Math.Floor(endTime / 60);
                    var   s       = (float)Math.Ceiling(endTime % 60);
                    return(s < 10 ? m + ":0" + s : m + ":" + s);
                };
                text.PositionUpdate = delegate
                {
                    Vector2 hpPos = new Vector2();
                    if (ability.Key.Target != null)
                    {
                        hpPos = ability.Key.Target.HPBarPosition;
                    }
                    if (ability.Key.Owner != null)
                    {
                        hpPos = ability.Key.Owner.HPBarPosition;
                    }
                    hpPos.X = hpPos.X + 80;
                    return(hpPos);
                };
                text.VisibleCondition = delegate
                {
                    return(Timer.Timers.GetActive() && ImmuneTimer.GetActive() &&
                           ability.Key.Casted && ability.Key.TimeCasted > 0);
                };
                text.Add();
                Abilities[ability.Key] = text;
            }

            GameObject.OnCreate += Obj_AI_Base_OnCreate;
            Game.OnUpdate       += Game_OnGameUpdate;
        }
示例#26
0
        public Killable() //TODO: Add more option for e.g. most damage first, add ignite spell
        {
            int index = 0;

            foreach (Obj_AI_Hero enemy in ObjectManager.Get <Obj_AI_Hero>())
            {
                int i = 0 + index;
                if (enemy.IsEnemy)
                {
                    Combo            nCombo   = CalculateKillable(enemy, null);
                    InternalKillable killable = new InternalKillable(null, null);
                    Render.Text      text     = new Render.Text(new Vector2(0, 0), "", 28, SharpDX.Color.OrangeRed);
                    text.Centered         = true;
                    text.OutLined         = true;
                    text.VisibleCondition = sender =>
                    {
                        return((killable.Combo != null ? killable.Combo.Killable : false) && enemy.IsVisible && !enemy.IsDead &&
                               Tracker.Trackers.GetActive() && KillableTracker.GetActive());
                    };
                    text.PositionUpdate = delegate
                    {
                        return(new Vector2(Drawing.Width / 2, Drawing.Height * 0.80f - (17 * i)));
                    };
                    text.TextUpdate = delegate
                    {
                        if (killable.Combo == null)
                        {
                            return("");
                        }
                        Combo  combo    = killable.Combo;
                        String killText = "Killable " + enemy.ChampionName + ": ";
                        if (combo.Spells != null && combo.Spells.Count > 0)
                        {
                            combo.Spells.ForEach(x => killText += x.Name + "/");
                        }
                        if (combo.Items != null && combo.Items.Count > 0)
                        {
                            combo.Items.ForEach(x => killText += x.Name + "/");
                        }
                        if (killText.Contains("/"))
                        {
                            killText = killText.Remove(killText.LastIndexOf("/"));
                        }
                        return(killText);
                    };
                    text.Add();
                    killable = new InternalKillable(nCombo, text);
                    _enemies.Add(enemy, killable);
                }
                index++;
            }
            ThreadHelper.GetInstance().Called += Game_OnGameUpdate;
            //Game.OnGameUpdate += Game_OnGameUpdate;
        }
示例#27
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            WardText = new Render.Text(
                "Ward Count: 0/3", Drawing.Width / 2 + 500, Drawing.Height - 50, 22, Color.Yellow);
            WardText.Add();

            OnWardSound          = new SoundObject(Resources.OnWard);
            Game.OnGameUpdate   += Game_OnGameUpdate;
            GameObject.OnCreate += GameObject_OnCreate;
            //Game.OnGameNotifyEvent += Game_OnGameNotifyEvent;
        }
 public AltarObject(String name, Obj_AI_Minion obj)
 {
     Name            = name;
     Obj             = obj;
     SpawnTime       = 185;
     RespawnTime     = 90;
     Locked          = false;
     NextRespawnTime = 0;
     MapType         = Utility.Map.MapType.TwistedTreeline;
     Called          = false;
     TextMinimap     = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value, new ColorBGRA(Color4.White));
     Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += AltarObject_ValueChanged;
     TextMinimap.TextUpdate = delegate
     {
         return((NextRespawnTime - (int)Game.ClockTime).ToString());
     };
     TextMinimap.PositionUpdate = delegate
     {
         if (Obj.ServerPosition.Length().Equals(0.0f))
         {
             return(new Vector2(0, 0));
         }
         Vector2 sPos = Drawing.WorldToMinimap(Obj.ServerPosition);
         return(new Vector2(sPos.X, sPos.Y));
     };
     TextMinimap.VisibleCondition = sender =>
     {
         return(Timer.Timers.GetActive() && AltarTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type && TextMinimap.X != 0);
     };
     TextMinimap.OutLined = true;
     TextMinimap.Centered = true;
     TextMinimap.Add();
     TextMap            = new Render.Text(0, 0, "", (int)(Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue <Slider>().Value * 3.5), new ColorBGRA(Color4.White));
     TextMap.TextUpdate = delegate
     {
         return((NextRespawnTime - (int)Game.ClockTime).ToString());
     };
     TextMap.PositionUpdate = delegate
     {
         if (Obj.ServerPosition.Length().Equals(0.0f))
         {
             return(new Vector2(0, 0));
         }
         Vector2 sPos = Drawing.WorldToScreen(Obj.ServerPosition);
         return(new Vector2(sPos.X, sPos.Y));
     };
     TextMap.VisibleCondition = sender =>
     {
         return(Timer.Timers.GetActive() && AltarTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type && TextMinimap.X != 0);
     };
     TextMap.OutLined = true;
     TextMap.Centered = true;
     TextMap.Add();
 }
示例#29
0
 public DrawText(JungleCamp camp)
 {
     Text = new Render.Text(Drawing.WorldToMinimap(camp.Position), "", 15, SharpDX.Color.White)
     {
         VisibleCondition = sender => (camp.NextRespawnTime > 0),
         TextUpdate       = () => (camp.NextRespawnTime - (int)Game.ClockTime).ToString(CultureInfo.InvariantCulture),
     };
     JungleCamp = camp;
     Text.Add(_layer);
     _layer++;
 }
示例#30
0
        private static Render.Text RenderText(string text, bool isTop, int indexof, double toffset, Color2 color)
        {
            int       ystart   = isTop ? (int)((15f / 768f) * Drawing.Height + (toffset / 768f * Drawing.Height)) : (int)((411f / 768f) * Drawing.Height + (toffset / 768f * Drawing.Height));
            int       xformula = isTop ? (int)((210f / 1366f) * Drawing.Width + ((indexof * 200f / 1366f) * Drawing.Width)) : (int)((210f / 1366f) * Drawing.Width + ((indexof - 5) * 200f / 1366f * Drawing.Width));
            const int size     = 20;
            var       texty    = new Render.Text(text, xformula, ystart, size, color);

            texty.VisibleCondition = sender => (!disabletext && !Misc.Config.Item("OnlyKeyShow").GetValue <bool>() || Misc.Config.Item("ShowKey").GetValue <KeyBind>().Active&& (Game.Mode != GameMode.Running || !Misc.Config.Item("notingame").GetValue <bool>()));

            texty.Add(1);
            return(texty);
        }