Esempio n. 1
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();
                    });
                }
            }
        }
Esempio n. 2
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;
 }
Esempio n. 3
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();
            }
        }
Esempio n. 4
0
 public ChampionInfo(Obj_AI_Hero hero, bool ally)
 {
     index++;
     int textoffset = index * 50;
     _hero = hero;
     Render.Text text = new Render.Text(
         new Vector2(), _hero.ChampionName, 20,
         ally
             ? new Color { R = 205, G = 255, B = 205, A = 255 }
             : new Color { R = 255, G = 205, B = 205, A = 255 })
     {
         PositionUpdate =
             () =>
                 Drawing.WorldToScreen(
                     ObjectManager.Player.Position.Extend(_hero.Position, 300 + textoffset)),
         VisibleCondition = delegate
         {
             float dist = _hero.Distance(ObjectManager.Player.Position);
             return Program.Instance().ShowChampionNames && !_hero.IsDead &&
                    Game.ClockTime - _lineStart < Program.Instance().LineDuration &&
                    (!_hero.IsVisible || !Render.OnScreen(Drawing.WorldToScreen(_hero.Position))) &&
                    dist < Program.Instance().Radius && dist > 300 + textoffset;
         },
         Centered = true,
         OutLined = true,
     };
     text.Add(1);
     _line = new Render.Line(
         new Vector2(), new Vector2(), 5,
         ally ? new Color { R = 0, G = 255, B = 0, A = 125 } : new Color { R = 255, G = 0, B = 0, A = 125 })
     {
         StartPositionUpdate = () => Drawing.WorldToScreen(ObjectManager.Player.Position),
         EndPositionUpdate = () => Drawing.WorldToScreen(_hero.Position),
         VisibleCondition =
             delegate
             {
                 return !_hero.IsDead && Game.ClockTime - _lineStart < Program.Instance().LineDuration &&
                        _hero.Distance(ObjectManager.Player.Position) < (Program.Instance().Radius + 1000);
             }
     };
     _line.Add(0);
     Render.Line minimapLine = new Render.Line(
         new Vector2(), new Vector2(), 2,
         ally ? new Color { R = 0, G = 255, B = 0, A = 255 } : new Color { R = 255, G = 0, B = 0, A = 255 })
     {
         StartPositionUpdate = () => Drawing.WorldToMinimap(ObjectManager.Player.Position),
         EndPositionUpdate = () => Drawing.WorldToMinimap(_hero.Position),
         VisibleCondition =
             delegate
             {
                 return Program.Instance().DrawMinimapLines && !_hero.IsDead && Game.ClockTime - _lineStart < Program.Instance().LineDuration;
             }
     };
     minimapLine.Add(0);
     Game.OnUpdate += Game_OnGameUpdate;
     OnEnterRange += ChampionInfo_OnEnterRange;
 }
        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();
        }
Esempio n. 6
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;
        }
Esempio n. 7
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Menu = new Menu("Humanizer", "Humanizer", true);

            var spells = Menu.AddSubMenu(new Menu("Spells", "Spells"));

            foreach (var spell in Items)

            {
                var menu = spells.AddSubMenu(new Menu(spell.ToString(), spell.ToString()));
                menu.AddItem(new MenuItem("Enabled" + spell, "Delay " + spell).SetValue(true));
                menu.AddItem(new MenuItem("MinDelay" + spell, "Minimum Delay").SetValue(new Slider(80)));
                menu.AddItem(new MenuItem("MaxDelay" + spell, "Maximum Delay").SetValue(new Slider(200, 100, 400)));
                LastCast.Add(spell, 0);
            }

            spells.AddItem(new MenuItem("DrawSpells", "Draw Blocked Spell Count").SetValue(true));

            var move = Menu.AddSubMenu(new Menu("Movement", "Movement"));
            move.AddItem(new MenuItem("MovementEnabled", "Enabled").SetValue(true));
            move.AddItem(new MenuItem("MovementHumanizeDistance", "Humanize Movement Distance").SetValue(true));
            move.Item("MovementHumanizeDistance")
                .SetTooltip("Stops the orbwalker from moving too closely to last movement");

            move.AddItem(new MenuItem("MovementHumanizeRate", "Humanize Movement Rate").SetValue(true));
            move.Item("MovementHumanizeRate").SetTooltip("Stops the orbwalker from sending too many movement requests.");

            move.AddItem(new MenuItem("MinDelay", "Minimum Delay")).SetValue(new Slider(80));
            move.AddItem(new MenuItem("MaxDelay", "Maximum Delay")).SetValue(new Slider(200, 100, 400));
            move.AddItem(new MenuItem("DrawMove", "Draw Blocked Movement Count").SetValue(true));

            Menu.AddToMainMenu();

            BlockedSpells = new Render.Text(
                "Blocked Spells: ", Drawing.Width - 200, Drawing.Height - 600, 28, Color.Green);
            BlockedSpells.VisibleCondition += sender => Menu.Item("DrawSpells").IsActive();
            BlockedSpells.TextUpdate += () => "Blocked Spells: " + BlockedSpellCount;
            BlockedSpells.Add();

            BlockedMovement = new Render.Text(
                "Blocked Move: ", Drawing.Width - 200, Drawing.Height - 625, 28, Color.Green);
            BlockedMovement.VisibleCondition += sender => Menu.Item("DrawMove").IsActive();
            BlockedMovement.TextUpdate += () => "Blocked Move: " + BlockedMoveCount;
            BlockedMovement.Add();


            Obj_AI_Base.OnIssueOrder += Obj_AI_Base_OnIssueOrder;
            Spellbook.OnCastSpell += Spellbook_OnCastSpell;
        }
Esempio n. 8
0
        public TimerDraw(int netId, string name, float duration, Vector3 position, float createdAt, GameObject senderN, int realtimecheck)
        {
            try
            {
                NetworkId = netId;
                Name = name;
                Duration = duration;
                Position = position;
                CreatedAt = createdAt;
                if (senderN == null)
                    return;
                SenderN = senderN;
                RealtimeCheck = realtimecheck;

                Timer = new Render.Text("", new Vector2(0, 0), (MenuList.Testsize.GetValue<Slider>().Value) * 2, SharpDX.Color.White)
                {
                    VisibleCondition =
                    condition => (((Math.Abs(Duration - (-1)) < 0 || (int)((CreatedAt + Duration + 1) - Game.Time) > 0) && (duration) > 0 && Visible)),

                    PositionUpdate = delegate
                    {
                        var pos = Drawing.WorldToScreen(new Vector3(Position.X, Position.Y, Position.Z));

                        switch (RealtimeCheck)
                        {
                            case 0: //Object First Created Posistion
                                break;
                            case 2: //Realtime on Sender Position
                                Position = SenderN.Position;
                                Position.Y += 40f;
                                break;

                        }
                        return pos;
                    },
                    TextUpdate = () => ((CreatedAt + Duration) - Game.Time).ToString("0.0"),
                    OutLined = true,
                    Centered = true
                };
                Timer.Add();
            }
            catch (Exception e)
            {
                Console.WriteLine("===MataView Error=== / TimerDraw");
                Console.WriteLine(e);
                throw;
            }
        }
Esempio n. 9
0
        public TimeDrawP(string name, float duration, Vector3 position, float createdAt, int positiontype, Obj_AI_Base obj, GameObject arg)
        {
            Name = name;
            Duration = duration;
            Position = position;
            CreatedAt = createdAt;
            PositionType = positiontype;
            Arg = arg;
            Obj = obj;

            Timer = new Render.Text("", new Vector2(0, 0), (MenuList.Testsize.GetValue<Slider>().Value) * 2, SharpDX.Color.White)
            {
                VisibleCondition = delegate
                {
                    switch (PositionType)
                    {
                        case 0:
                            Visible = Obj.IsVisible;
                            break;
                        case 1:
                            Visible = Arg.IsVisible;
                            break;
                    }
                    return ((Math.Abs(Duration - (-1)) < 0 || (int)((CreatedAt + Duration + 1) - Game.Time) > 0) && (duration) > 0 && Visible && VisibleTimer);
                },

                PositionUpdate = delegate
                {
                    var pos = Drawing.WorldToScreen(new Vector3(Position.X, Position.Y, Position.Z));
                    switch (PositionType)
                    {
                        case 0: //always self
                            Position = Obj.Position;
                            break;
                        case 1: //target
                            Position = Arg.Position;
                            break;
                    }
                    Position.Y += 40;
                    return pos;
                },
                TextUpdate = () => ((CreatedAt + Duration) - Game.Time).ToString("0.0"),
                OutLined = true,
                Centered = true
            };
            Timer.Add();
        }
Esempio n. 10
0
 //TODO: Add more option for e.g. most damage first, add ignite spell
 public Killable()
 {
     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;
 }
Esempio n. 11
0
        public HeroTracker(Obj_AI_Hero hero, Bitmap bmp)
        {
            Hero = hero;

            RecallStatus = Packet.S2C.Teleport.Status.Unknown;
            Hero = hero;
            var image = new Render.Sprite(bmp, new Vector2(0, 0));
            image.GrayScale();
            image.Scale = new Vector2(MinimapHack.Instance().Menu.IconScale, MinimapHack.Instance().Menu.IconScale);
            image.VisibleCondition = sender => !hero.IsVisible && !hero.IsDead;
            image.PositionUpdate = delegate
            {
                Vector2 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;

            Text = new Render.Text(0, 0, "", MinimapHack.Instance().Menu.SSTimerSize, Color.White)
            {
                VisibleCondition =
                    sender =>
                        !hero.IsVisible && !Hero.IsDead && MinimapHack.Instance().Menu.SSTimer && LastSeen > 20f &&
                        MinimapHack.Instance().Menu.SSTimerStart <= Game.ClockTime - LastSeen,
                PositionUpdate = delegate
                {
                    Vector2 v2 = Drawing.WorldToMinimap(LastLocation);
                    v2.Y += MinimapHack.Instance().Menu.SSTimerOffset;
                    return v2;
                },
                TextUpdate = () => Program.Format(Game.ClockTime - LastSeen),
                OutLined = true,
                Centered = true
            };
            Text.Add(0);

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Game.OnGameUpdate += Game_OnGameUpdate;
            Drawing.OnEndScene += Drawing_OnEndScene;
        }
Esempio n. 12
0
        public ListedText(int netId, string name, float duration, Vector3 position, float createdAt, GameObject senderN, int realtimecheck, Obj_AI_Hero heroname)
        {
            NetworkId = netId;
            Name = name;
            Duration = duration;
            Position = position;
            CreatedAt = createdAt;

            SenderN = senderN;
            RealtimeCheck = realtimecheck;
            Heroname = heroname;

            Timer = new Render.Text("", new Vector2(0, 0), (Menus.testsize.GetValue<Slider>().Value) * 2, SharpDX.Color.White)
            {
                VisibleCondition =
                condition => (((Math.Abs(Duration - (-1)) < 0 || (int)((CreatedAt + Duration + 1) - Game.Time) > 0) && (duration) > 0 && Visible)),

                PositionUpdate = delegate
                {
                    var pos = Drawing.WorldToScreen(new Vector3(Position.X, Position.Y, Position.Z));
                    switch (RealtimeCheck)
                    {
                        case 0: //Object First Created Posistion

                            break;
                        case 1: //Realtime on Hero Position
                            Position = Heroname.Position;
                            Position.Y += 80f; // I don't know why it needs, but if I don't add posistion it won't draw timer
                            break;
                        case 2: //Realtime on Sender Position
                            Position = SenderN.Position;
                            Position.Y += 40f;
                            break;

                    }
                    return pos;
                },
                TextUpdate = () => ((CreatedAt + Duration) - Game.Time).ToString("0.0"),
                OutLined = true,
                Centered = true
            };
            Timer.Add();
        }
Esempio n. 13
0
        public FoWSpellEnemy()
        {
            switch (ObjectManager.Player.ChampionName)
            {
                case "Evelynn":
                    spell = SpellSlot.Q;
                    break;

                case "Katarina":
                    spell = SpellSlot.R;
                    break;

                case "Morgana":
                    spell = SpellSlot.R;
                    break;

                case "Tryndamere":
                    spell = SpellSlot.W;
                    break;
            }
            if (spell != SpellSlot.Unknown)
            {
                text = new Render.Text(0, 0, "", 24, SharpDX.Color.OrangeRed);
                text.TextUpdate = delegate
                {
                    return "";
                };
                text.PositionUpdate = delegate
                {
                    return new Vector2(Drawing.Width / 2, 100);
                };
                text.VisibleCondition = sender =>
                {
                    return Detector.Detectors.GetActive() && FoWSpellEnemyDetector.GetActive() && ObjectManager.Player.Spellbook.CanUseSpell(spell) == SpellState.Ready;
                };
                text.OutLined = true;
                text.Centered = true;
                text.Add(4);
            }
        }
Esempio n. 14
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);

            Menu.AddSubMenu(new Menu("Orbwalker", "Orbwalker"));
            OrbWalker = new Orbwalking.Orbwalker(Menu.SubMenu("Orbwalker"));

            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))
                {
                    OutLined = true
                };
                Text.Add();
            }

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

            Menu.Item("Draw").ValueChanged += OnValueChanged;
            Game.OnUpdate += Game_OnGameUpdate;
        }
Esempio n. 15
0
        private static void GameOnOnGameLoad(EventArgs args)
        {
            _greenBar = new Render.Sprite(Resource1.bar_green, new Vector2(Drawing.Width / 2 - ImgWidth / 2, 100));
            _redBar = new Render.Sprite(Resource1.bar_red, new Vector2(Drawing.Width / 2 - ImgWidth / 2, 100));

            _leftText = new Render.Text(
                "2375", _redBar.X - Drawing.GetTextExtent("2375").Width, _redBar.Y, 12, Color.White);
            _middleText = new Render.Text(
                "50%", Drawing.Width / 2 - Drawing.GetTextExtent("50%").Width / 2, _redBar.Y, 12, Color.White);
            _rightText = new Render.Text(
                "2375", _redBar.X + Drawing.GetTextExtent("2375").Width, _redBar.Y, 12, Color.White);

            _redBar.Add();
            _greenBar.Add();
            _leftText.Add();
            _middleText.Add();
            _rightText.Add();

            UpdateDrawings();

            Game.OnProcessPacket += Game_OnGameProcessPacket;
            Game.PrintChat("Golderino by ChewyMoon loaded.");
        }
Esempio n. 16
0
        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;
        }
Esempio n. 17
0
        public static void Game_OnGameLoad()
        {
            Menu = MainMenu.AddMenu("Humanizer", "Humanizer");

            spells = Menu.AddSubMenu("Spells", "Spells");
            foreach (var spell in Items)
            {
                spells.AddGroupLabel(spell.ToString());
                spells.Add("Enabled" + spell, new CheckBox("Delay " + spell));
                spells.Add("MinDelay" + spell, new Slider("Minimum Delay", 80));
                spells.Add("MaxDelay" + spell, new Slider("Maximum Delay", 200, 100, 400));
                LastCast.Add(spell, 0);
                spells.AddSeparator();
            }
            spells.Add("DrawSpells", new CheckBox("Draw Blocked Spell Count"));

            move = Menu.AddSubMenu("Movement", "Movement");
            move.Add("MovementEnabled", new CheckBox("Enabled"));
            move.Add("MovementHumanizeDistance", new CheckBox("Humanize Movement Distance"));
            move.Add("MovementHumanizeRate", new CheckBox("Humanize Movement Rate"));
            move.Add("MinDelay", new Slider("Minimum Delay", 80));
            move.Add("MaxDelay", new Slider("Maximum Delay", 200, 100, 400));
            move.Add("DrawMove", new CheckBox("Draw Blocked Movement Count"));

            BlockedSpells = new Render.Text("Blocked Spells: ", Drawing.Width - 200, Drawing.Height - 600, 28, Color.Green);
            BlockedSpells.VisibleCondition += sender => getCheckBoxItem(spells, "DrawSpells");
            BlockedSpells.TextUpdate += () => "Blocked Spells: " + BlockedSpellCount;
            BlockedSpells.Add();

            BlockedMovement = new Render.Text("Blocked Move: ", Drawing.Width - 200, Drawing.Height - 625, 28, Color.Green);
            BlockedMovement.VisibleCondition += sender => getCheckBoxItem(move, "DrawMove");
            BlockedMovement.TextUpdate += () => "Blocked Move: " + BlockedMoveCount;
            BlockedMovement.Add();

            EloBuddy.Player.OnIssueOrder += Obj_AI_Base_OnIssueOrder;
            Spellbook.OnCastSpell += Spellbook_OnCastSpell;
        }
Esempio n. 18
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;
 }
Esempio n. 19
0
        /// <summary>
        /// Creates the render objects.
        /// </summary>
        public void CreateRenderObjects()
        {
            TextObject = new Render.Text((int)Drawing.WorldToScreen(Position).X, (int)Drawing.WorldToScreen(Position).Y, "", 17, new ColorBGRA(255, 255, 255, 255))
            {
                VisibleCondition = sender => Render.OnScreen(Drawing.WorldToScreen(Position)) && WardTrackerBase.moduleMenu["dz191.dza.ward.track"].Cast<CheckBox>().CurrentValue,
                PositionUpdate = () => new Vector2(Drawing.WorldToScreen(Position).X, Drawing.WorldToScreen(Position).Y + 12),
                TextUpdate = () => (Environment.TickCount < startTick + WardTypeW.WardDuration && WardTypeW.WardDuration < float.MaxValue) ? (Utils.FormatTime(Math.Abs(Environment.TickCount - (startTick + WardTypeW.WardDuration)) / 1000f)) : string.Empty
            };
            TextObject.Add(0);

            MinimapSpriteObject = new Render.Sprite(MinimapBitmap, new Vector2())
            {
                PositionUpdate =  () => MinimapPosition,
                VisibleCondition = sender => WardTrackerBase.moduleMenu["dz191.dza.ward.track"].Cast<CheckBox>().CurrentValue && Environment.TickCount <  this.startTick + this.WardTypeW.WardDuration,
                Scale = new Vector2(0.7f, 0.7f)
            };
            MinimapSpriteObject.Add(0);
        }
Esempio n. 20
0
        private void CreateText(Ability ability, Obj_AI_Hero owner, GameObject sender)
        {
            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.TimeCasted - (int)Game.ClockTime + ability.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 pos = new Vector2(0,0);
                //switch (ability.Position)
                //{
                //    case Position.Hero:
                //        if (owner.IsValid)
                //        {
                //            pos = Drawing.WorldToScreen(owner.Position);
                //        }
                //        break;

                //    case Position.Sender:
                //        if (sender.IsValid)
                //        {
                //            pos = Drawing.WorldToScreen(sender.Position);
                //        }
                //        break;

                //    case Position.Default:
                //        if (sender.IsValid)
                //        {
                //            pos = Drawing.WorldToScreen(sender.Position);
                //        }
                //        break;
                //}
                if (sender.IsValid)
                {
                    pos = Drawing.WorldToScreen(sender.Position);
                }
                return pos;
            };
            text.VisibleCondition = delegate
            {
                return Timer.Timers.GetActive() && SpellTimer.GetActive() &&
                        ability.Casted && ability.TimeCasted > -1;
            };
            text.Add();
            Abilities[ability].Add(new AbilityDetails(owner, sender, text));
        }
Esempio n. 21
0
        public void CreateRenderObjects()
        {
            //Create the minimap sprite.

            if (Range == 1100)
            {
                _minimapSprite = new Render.Sprite(WardData.Bitmap, MinimapPosition);
                _minimapSprite.Scale = new Vector2(_scale, _scale);
                _minimapSprite.Add(0);
            }

            //Create the circle:
            _defaultCircle = new Render.Circle(Position, 200, Color, 5, true);
            _defaultCircle.VisibleCondition +=
                sender =>
                    WardTracker.Config.Item("Enabled").GetValue<bool>() &&
                    !WardTracker.Config.Item("Details").GetValue<KeyBind>().Active &&
                    Render.OnScreen(Drawing.WorldToScreen(Position));
            _defaultCircle.Add(0);
            _defaultCircleFilled = new Render.Circle(Position, 200, Color.FromArgb(25, Color), -142857, true);
            _defaultCircleFilled.VisibleCondition +=
                sender =>
                    WardTracker.Config.Item("Enabled").GetValue<bool>() &&
                    !WardTracker.Config.Item("Details").GetValue<KeyBind>().Active &&
                    Render.OnScreen(Drawing.WorldToScreen(Position));
            _defaultCircleFilled.Add(-1);

            //Create the circle that shows the range
            _rangeCircle = new Render.Circle(Position, Range, Color, 10, false);
            _rangeCircle.VisibleCondition +=
                sender =>
                    WardTracker.Config.Item("Enabled").GetValue<bool>() &&
                    WardTracker.Config.Item("Details").GetValue<KeyBind>().Active;
            _rangeCircle.Add(0);

            _rangeCircleFilled = new Render.Circle(Position, Range, Color.FromArgb(25, Color), -142857, true);
            _rangeCircleFilled.VisibleCondition +=
                sender =>
                    WardTracker.Config.Item("Enabled").GetValue<bool>() &&
                    WardTracker.Config.Item("Details").GetValue<KeyBind>().Active;
            _rangeCircleFilled.Add(-1);

            //Missile line;
            if (IsFromMissile)
            {
                _missileLine = new Render.Line(new Vector2(), new Vector2(), 2, new ColorBGRA(255, 255, 255, 255));
                _missileLine.EndPositionUpdate = () => Drawing.WorldToScreen(Position);
                _missileLine.StartPositionUpdate = () => Drawing.WorldToScreen(StartPosition);
                _missileLine.VisibleCondition +=
                    sender =>
                        WardTracker.Config.Item("Enabled").GetValue<bool>() &&
                        WardTracker.Config.Item("Details").GetValue<KeyBind>().Active;
                _missileLine.Add(0);
            }

            //Create the timer text:
            if (Duration != int.MaxValue)
            {
                _timerText = new Render.Text(10, 10, "t", 18, new ColorBGRA(255, 255, 255, 255));
                _timerText.OutLined = true;
                _timerText.PositionUpdate = () => Drawing.WorldToScreen(Position);
                _timerText.Centered = true;
                _timerText.VisibleCondition +=
                    sender =>
                        WardTracker.Config.Item("Enabled").GetValue<bool>() &&
                        Render.OnScreen(Drawing.WorldToScreen(Position));

                _timerText.TextUpdate =
                    () =>
                        (IsFromMissile ? "?? " : "") + Utils.FormatTime((EndT - Environment.TickCount) / 1000f) +
                        (IsFromMissile ? " ??" : "");
                _timerText.Add(2);
            }
        }
Esempio n. 22
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();
            }
        }
Esempio n. 23
0
        /// <summary>
        /// Initializes the drawings.
        /// </summary>
        public override void InitDrawings()
        {
            Rectangle = new Rectangle_Ex((int)this.Position.X, (int)this.Position.Y, (int)this.Width, (int)this.Height, Color.DodgerBlue)
            {
                VisibleCondition = delegate
                { return HudVariables.ShouldBeVisible && HudVariables.CurrentStatus == SpriteStatus.Expanded; }
            };

            Text = new Render.Text(
                (int) (this.Position.X + this.Width / 2f - Helper.GetSize(this.Name, 17)), (int) this.Position.Y - 9,
                this.Name, 17, Color.White)
            {
                VisibleCondition = delegate
                {
                    return HudVariables.ShouldBeVisible && HudVariables.CurrentStatus == SpriteStatus.Expanded;
                },
                Centered = true
            };

            Rectangle.Add(2);
            Text.Add(2);
        }
Esempio n. 24
0
        public RecallInfo(AIHeroClient hero, int index)
        {
            _hero = hero;
            _index = index;
            _sprite = new Render.Sprite(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 * 20))
            };
            _sprite.Add(0);

            _healthText = new Render.Text(0, 0, "", 20, Color.Green)
            {
                OutLined = true,
                VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000,
                PositionUpdate = delegate
                {
                    Rectangle rect = TextFont.MeasureText("(" + (int)hero.HealthPercent + "%)");
                    return new Vector2(_sprite.X - rect.Width - GapTextBar, _sprite.Y - rect.Height / 2 + (_sprite.Height * Program.Instance().BarScale) / 2);
                },
                TextUpdate = () => "(" + (int)hero.HealthPercent + "%)"
            };

            _healthText.Add(1);
            Render.Text heroText = new Render.Text(0, 0, _hero.ChampionName, 20, Color.White)
            {
                OutLined = true,
                VisibleCondition = sender => _active || Environment.TickCount - lastChange < 3000,
                PositionUpdate = delegate
                {
                    Rectangle rect = TextFont.MeasureText(_hero.ChampionName + _healthText.text);
                    return new Vector2(_sprite.X - rect.Width - GapTextBar - 3, _sprite.Y - rect.Height / 2 + (_sprite.Height * Program.Instance().BarScale) / 2);
                }
            };

            heroText.Add(1);
            _countdownText = new Render.Text(0, 0, "", 20, Color.White)
            {
                OutLined = true,
                VisibleCondition = sender => _active
            };
            _countdownText.Add(1);
            Game.OnUpdate += Game_OnGameUpdate;
            Teleport.OnTeleport += Teleport_OnTeleport;
        }
Esempio n. 25
0
            public Camp(string name,
                float spawnTime,
                int respawnTimer,
                Vector3 position,
                List<Mob> mobs,
                Utility.Map.MapType mapType,
                GameObjectTeam team,
                Color colour,
                Timers timer,
                bool isRanged = false,
                int state = 0,
                int respawnTime = 0,
                int lastChangeOnState = 0,
                bool shouldping = true,
                int lastPing = 0)
            {
                Name = name;
                SpawnTime = spawnTime;
                RespawnTimer = respawnTimer;
                Position = position;
                MapPosition = Drawing.WorldToScreen(Position);
                MinimapPosition = Drawing.WorldToMinimap(Position);
                Mobs = mobs;
                MapType = mapType;
                Team = team;
                Colour = colour;
                IsRanged = isRanged;
                State = state;
                RespawnTime = respawnTime;
                LastChangeOnState = lastChangeOnState;
                Timer = timer;
                ShouldPing = shouldping;
                LastPing = lastPing;

                #region Load Text

                TextMinimap = new Render.Text(0, 0, "", Program._menu.Item("timerfontminimap").GetValue<Slider>().Value, Program.White)
                {
                    VisibleCondition =
                        sender =>
                            Program.Timeronminimap && RespawnTime > Environment.TickCount && State == 7,
                    PositionUpdate = delegate
                    {
                        Vector2 v2 = Timer.MinimapPosition;
                        return v2;
                    },
                    TextUpdate = () => Timer.TextOnMinimap,
                    OutLined = false,
                    Centered = true
                };
                TextMinimap.Add();

                TextMap = new Render.Text(0, 0, "", Program._menu.Item("timerfontmap").GetValue<Slider>().Value, Program.White)
                {
                    VisibleCondition =
                        sender =>
                            Program.Timeronmap && RespawnTime > Environment.TickCount && State == 7 && Position.IsOnScreen(),
                    PositionUpdate = delegate
                    {
                        Vector2 v2 = Timer.Position;
                        return v2;
                    },
                    TextUpdate = () => Timer.TextOnMap,
                    OutLined = false,
                    Centered = true
                };
                TextMap.Add();

                #endregion

                //Drawing.OnEndScene += Drawing_OnEndScene;
            }
Esempio n. 26
0
 public HealthObject(Obj_AI_Minion obj)
 {
     Obj = obj;
     if (obj != null && obj.IsValid)
         Position = obj.Position;
     else
         Position = new Vector3();
     SpawnTime = (int)Game.ClockTime;
     RespawnTime = 40;
     NextRespawnTime = 0;
     Locked = false;
     MapType = Utility.Map.MapType.HowlingAbyss;
     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 Timer.Timers.GetActive() && HealthTimer.GetActive() && NextRespawnTime > 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 Timer.Timers.GetActive() && HealthTimer.GetActive() && NextRespawnTime > 0 && MapType == GMap.Type;
     };
     TextMap.OutLined = true;
     TextMap.Centered = true;
     TextMap.Add();
 }
Esempio n. 27
0
 private void Init()
 {
     foreach (Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>())
     {
         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
         {
             if (hero.IsEnemy)
             {
                 Speech.Speak(Language.GetString("DETECTORS_GANK_TEXT_JUNGLER_ENEMY"));
             }
             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();
         if (hero.IsEnemy)
         {
             Enemies.Add(hero, new InternalGankDetector(text, line));
         }
     }
 }
Esempio n. 28
0
        //TODO: Draw HP above BarPos
        private void Init()
        {
            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 IsActive() && 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));
            }
        }
Esempio n. 29
0
 public JungleCamp(String name, GameObjectTeam team, int campId, int spawnTime, int respawnTime,
     Utility.Map.MapType mapType, Vector3 mapPosition, Vector3 minimapPosition, JungleMob[] creeps)
 {
     Name = name;
     Team = team;
     CampId = campId;
     SpawnTime = spawnTime;
     RespawnTime = respawnTime;
     MapType = mapType;
     MapPosition = mapPosition;
     MinimapPosition = minimapPosition;
     Creeps = creeps;
     NextRespawnTime = 0;
     Called = false;
     Dead = false;
     Visible = false;
     TextMinimap = new Render.Text(0, 0, "", Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").GetValue<Slider>().Value, new ColorBGRA(Color4.White));
     Timer.Timers.GetMenuItem("SAssembliesTimersTextScale").ValueChanged += JungleCamp_ValueChanged;
     TextMinimap.TextUpdate = delegate
     {
         return (NextRespawnTime - (int)Game.ClockTime).ToString();
     };
     TextMinimap.PositionUpdate = delegate
     {
         Vector2 sPos = Drawing.WorldToMinimap(MinimapPosition);
         return new Vector2(sPos.X, sPos.Y);
     };
     TextMinimap.VisibleCondition = sender =>
     {
         return IsActive() && NextRespawnTime > 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(MapPosition);
         return new Vector2(sPos.X, sPos.Y);
     };
     TextMap.VisibleCondition = sender =>
     {
         return IsActive() && NextRespawnTime > 0 && MapType == GMap.Type;
     };
     TextMap.OutLined = true;
     TextMap.Centered = true;
     TextMap.Add();
 }
Esempio n. 30
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++;
 }