Пример #1
0
        public static void Game_OnGameLoad()
        {
            try
            {
                foreach (var sName in
                    SummonersNames)
                {
                    SummonerTextures.Add(sName, GetSummonerTexture(sName));
                }

                CdFrame = new Render.Sprite(Resources.hud, Vector2.Zero );
                ReadyLine = new Render.Line(Vector2.Zero, Vector2.Zero, 2, Color.Black);
                Text = new Render.Text("", Vector2.Zero, 13, Color.Black);
            }
            catch (Exception e)
            {
                Console.WriteLine(@"/ff can't load the textures: " + e);
            }
            Drawing.OnPresent += Drawing_OnEndScene;
            Drawing.OnPreReset += DrawingOnOnPreReset;
            Drawing.OnPostReset += DrawingOnOnPostReset;
             //       Drawing.OnDraw += Drawing_OnEndScene;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;
            AppDomain.CurrentDomain.ProcessExit += CurrentDomain_DomainUnload;
        }
Пример #2
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();
            }
        }
Пример #3
0
        public static void OnGameLoad()
        {

            if (Player.ChampionName != "Riven") return;
            EloBuddy.Chat.Print("Hoola Riven - Loaded Successfully, Good Luck! :):)");
            EloBuddy.Chat.Print("Hoola Riven - Change Keys Bind in Orbwalk Menu");
            Q = new Spell(EloBuddy.SpellSlot.Q);
            W = new Spell(EloBuddy.SpellSlot.W);
            E = new Spell(EloBuddy.SpellSlot.E, 300);
            R = new Spell(EloBuddy.SpellSlot.R, 900);
            R.SetSkillshot(0.25f, 45, 1600, false, SkillshotType.SkillshotCone);

            OnMenuLoad();


            Timer = new Render.Text("Q Expiry =>  " + ((double)(LastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"), (int)EloBuddy.Drawing.WorldToScreen(Player.Position).X - 140, (int)EloBuddy.Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.MidnightBlue, "calibri");
            Timer2 = new Render.Text("R Expiry =>  " + (((double)LastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"), (int)EloBuddy.Drawing.WorldToScreen(Player.Position).X - 60, (int)EloBuddy.Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.IndianRed, "calibri");

            EloBuddy.Game.OnUpdate += OnTick;
            EloBuddy.Drawing.OnDraw += Drawing_OnDraw;
            EloBuddy.Drawing.OnEndScene += Drawing_OnEndScene;
            EloBuddy.Obj_AI_Base.OnProcessSpellCast += OnCast;
            EloBuddy.Obj_AI_Base.OnSpellCast += OnDoCast;
            EloBuddy.Obj_AI_Base.OnSpellCast += OnDoCastLC;
            EloBuddy.Obj_AI_Base.OnPlayAnimation += OnPlay;
            EloBuddy.Obj_AI_Base.OnProcessSpellCast += OnCasting;
            Interrupter2.OnInterruptableTarget += Interrupt;
        }
Пример #4
0
 private static void Game_OnGameLoad(EventArgs args)
 {
     Config = new Menu("TeamStats", "TeamStats", true);
     Config.AddItem(new MenuItem("X-pos", "X offset").SetValue(new Slider(0, -1500, 400)));
     Config.AddItem(new MenuItem("Y-pos", "Y offset").SetValue(new Slider(0, 200, -1080)));
     Config.AddItem(new MenuItem("Range", "Range").SetValue(new Slider(2200, 0, 20000)));
     Config.AddItem(new MenuItem("Default", "Default").SetValue(false));
     Config.AddItem(new MenuItem("Chart", "Chart").SetValue(true));
     Config.AddItem(new MenuItem("Small", "Small chart").SetValue(false));
     Config.AddItem(new MenuItem("Enabled", "Enabled").SetValue(true));
     Config.AddItem(new MenuItem("draw", "Draw range")).SetValue(new Circle(false, Color.LightBlue));
     Config.AddToMainMenu();
     //frame = loadFrame();
     gPower = loadText("", new ColorBGRA(Color.FromArgb(255, 34, 139, 34).ToArgb()));
     ePower = loadText("", new ColorBGRA(Color.FromArgb(255, 178, 34, 34).ToArgb()));
     aDmg = loadText("", new ColorBGRA(Color.White.ToArgb()));
     eDmg = loadText("", new ColorBGRA(Color.White.ToArgb()));
     aHealt = loadText("", new ColorBGRA(Color.White.ToArgb()));
     eHealt = loadText("", new ColorBGRA(Color.White.ToArgb()));
     aNum = loadText("", new ColorBGRA(Color.FromArgb(255, 34, 139, 34).ToArgb()));
     eNum = loadText("", new ColorBGRA(Color.FromArgb(255, 178, 34, 34).ToArgb()));
     versus = loadText("", new ColorBGRA(Color.White.ToArgb()));
     timer.Elapsed += OnTimerTick;
     timer.Enabled = true;
     Drawing.OnDraw += Drawing_OnDraw;
     Game.OnUpdate += Game_OnGameUpdate;
     Game.PrintChat("<font color='#9933FF'>Soresu </font><font color='#FFFFFF'>- TeamStats</font>");
 }
Пример #5
0
        public static void OnGameLoad()
        {
            if (Player.ChampionName != "Riven") return;

            Timer =
                new Render.Text(
                    "Q Expiry =>  " + ((double)(Logic._lastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"),
                    (int)Drawing.WorldToScreen(Player.Position).X - 140,
                    (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.DodgerBlue, "calibri");
            Timer2 =
                new Render.Text(
                    "R Expiry =>  " + (((double)Logic._lastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"),
                    (int)Drawing.WorldToScreen(Player.Position).X - 60,
                    (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.DodgerBlue, "calibri");
            Spells.Ignite = Player.GetSpellSlot("summonerdot");



            MenuConfig.LoadMenu();
            Spells.Initialise();
            Game.OnUpdate += OnTick;
            Drawing.OnDraw += Drawing_OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Obj_AI_Base.OnProcessSpellCast += Logic.OnCast;
            Obj_AI_Base.OnProcessSpellCast += OnCasting;
            Obj_AI_Base.OnSpellCast += OnDoCast;
            Obj_AI_Base.OnSpellCast += OnDoCastLc;
            Obj_AI_Base.OnPlayAnimation += OnPlay;
            Interrupter2.OnInterruptableTarget += Interrupt;
        }
Пример #6
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();
                    });
                }
            }
        }
Пример #7
0
      private static void OnGameLoad(EventArgs args)
        {

            if (Player.ChampionName != "Riven") return;
            Game.PrintChat("HELLO FROM THE OTHER SIIIDEE");
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W);
            E = new Spell(SpellSlot.E, 300);
            R = new Spell(SpellSlot.R, 900);
            R.SetSkillshot(0.25f, 45, 1600, false, SkillshotType.SkillshotCone);

            OnMenuLoad();


            Timer = new Render.Text("Q Expiry =>  " + ((double)(LastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 140, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.MidnightBlue, "calibri");
            Timer2 = new Render.Text("R Expiry =>  " + (((double)LastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 60, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.IndianRed, "calibri");

            Game.OnUpdate += OnTick;
            Drawing.OnDraw += Drawing_OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Obj_AI_Base.OnProcessSpellCast += OnCast;
            Obj_AI_Base.OnDoCast += OnDoCast;
            Obj_AI_Base.OnDoCast += OnDoCastLC;
            Obj_AI_Base.OnPlayAnimation += OnPlay;
            Obj_AI_Base.OnProcessSpellCast += OnCasting;
            Interrupter2.OnInterruptableTarget += Interrupt;
        }
Пример #8
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;
 }
Пример #9
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();
        }
Пример #11
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;
        }
Пример #12
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 IsActive() &&
                        ability.Casted && ability.TimeCasted > -1;
            };
            text.Add();
            Abilities[ability].Add(new AbilityDetails(owner, sender, text));
        }
Пример #13
0
        public Camp(int campId, string name, Vector2 position, int respawnTime)
        {
            _respawnDuration = respawnTime * 60 * 1000;
            _isMajor = IsMajorCamp(name);
            Name = name;
            Sprite = GetMapSprite(Name, position);
            RenderText = GetRenderText(position, _isMajor);
            RespawnTime = 0;

            foreach (var obj in ObjectManager.Get<Obj_AI_Minion>().Where(obj => obj.CampNumber == campId))
                CampObject = obj;

            Game.OnGameUpdate += Game_OnGameUpdate;
        }
Пример #14
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;
        }
Пример #15
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;
            }
        }
Пример #16
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();
        }
Пример #17
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;
 }
Пример #18
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;
        }
Пример #19
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();
        }
Пример #20
0
        static HbTracker()
        {
            try
            {
                foreach (var sName in SummonersNames)
                {
                    SummonerTextures.Add(sName, GetSummonerTexture(sName));
                }

                CdFrame = new Render.Sprite(Resources.hud, Vector2.Zero);
                ReadyLine = new Render.Line(Vector2.Zero, Vector2.Zero, 2, Color.Black);
                Text = new Render.Text("", Vector2.Zero, 13, Color.Black);
            }
            catch (Exception e)
            {
                Console.WriteLine(@"/ff can't load the textures: " + e);
            }

            Drawing.OnDraw += Drawing_OnEndScene;
        }
Пример #21
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);
            }
        }
Пример #22
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;
        }
Пример #23
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.");
        }
Пример #24
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;
        }
Пример #25
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;
        }
Пример #26
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);
        }
Пример #27
0
            /// <summary>
            ///     Initializes a new instance of the <see cref="Notification" /> class.
            /// </summary>
            /// <param name="Text">
            ///     The text.
            /// </param>
            /// <param name="Bit">
            ///     The bit.
            /// </param>
            public Notification(string Text, Bitmap Bit)
            {
                this.Sprite = new Render.Sprite(Bit, new Vector2(X, Y));
                this.Text = new Render.Text(
                    Text,
                    new Vector2(X, Y),
                    12,
                    new ColorBGRA(this.PresetColor.R, this.PresetColor.G, this.PresetColor.B, this.PresetColor.A));
                this.Text.Centered = true;

                this.Text.Add();
                this.Sprite.Add();
            }
Пример #28
0
 public AbilityDetails(Obj_AI_Hero owner, GameObject sender, Render.Text text)
 {
     Owner = owner;
     Sender = sender;
     Text = text;
 }
Пример #29
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);
            }
        }
Пример #30
0
        static void Game_OnGameLoad(EventArgs args)
        {
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W);
            E = new Spell(SpellSlot.E);
            R = new Spell(SpellSlot.R);

            Menu = new Menu("[xcsoft] SpellData Viewer", "xcsoft_spelldataviewer", true);
            Menu.AddToMainMenu();

            Menu.AddItem(new MenuItem("switch", "Switch")).SetValue<Boolean>(true);
            Menu.AddItem(new MenuItem("x", "X")).SetValue<Slider>(new Slider(250 ,0 , Drawing.Width));
            Menu.AddItem(new MenuItem("y", "Y")).SetValue<Slider>(new Slider(0, -2000, Drawing.Height));
            Menu.AddItem(new MenuItem("size", "Size")).SetValue<Slider>(new Slider(16, 10, 20));

            Menu.Item("x").ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
                {
                    Text.X = eventArgs.GetNewValue<Slider>().Value;
                };

            Menu.Item("y").ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
                {
                    Text.Y = eventArgs.GetNewValue<Slider>().Value;
                };

            Menu.Item("size").ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
                {
                    Text = new Render.Text(Menu.Item("x").GetValue<Slider>().Value, Menu.Item("y").GetValue<Slider>().Value, "", Menu.Item("size").GetValue<Slider>().Value, SharpDX.Color.White, Font);
                };

            Text = new Render.Text(Menu.Item("x").GetValue<Slider>().Value, Menu.Item("y").GetValue<Slider>().Value, "", Menu.Item("size").GetValue<Slider>().Value, SharpDX.Color.White, Font);

            Drawing.OnDraw += Drawing_OnDraw;
        }