Exemplo n.º 1
0
 private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
 {
     if (sender.Owner.IsMe && args.Slot == SpellSlot.E && Config.GetBool("标识E") && args.EndPosition.CountAlliesInRange(600) > 0)
     {
         TacticalMap.SendPing(PingCategory.OnMyWay, args.EndPosition);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Performs an illuminati ping at the specified location
        /// </summary>
        /// <param name="pos"></param>
        private static void Illuminati(Vector3 pos)
        {
            var time = Game.Time.ToTicks();

            if (lastPingTime + delay > time + 10)
            {
                return;
            }

            delay = Random.Next(6000, 20000);

            Pinged(time);

            var type = MainMenu["pingtype"].Enum <PingCategory>();
            var diff = MainMenu.GetMenu("advanced")["difference"] / 10;

            for (var i = 0; i < 6; i++)
            {
                var target = pos.ToVector2();

                target.X += 500f * (float)Math.Cos(i);
                target.Y += 500f * (float)Math.Sin(i);

                TacticalMap.SendPing(type, Randomizer.Randomize(target, diff));
            }
        }
Exemplo n.º 3
0
        private void OnVisionChanged(bool visible, AIHeroClient whom)
        {
            if (!_menuhandler.GetValue <bool>((Menu)_Mainmenu.Item("Global Switches"), "gank_alert"))
            {
                return;
            }

            if (whom.Team == ObjectManager.Me.Team)
            {
                return;
            }

            if (visible == false)
            {
                return;
            }

            if (_menuhandler.GetValue <bool>(_menu, whom.ChampionName))
            {
                if (whom.Distance3D(ObjectManager.Me) < _menuhandler.GetValue <int>(_menu, "detection_range"))
                {
                    last_seen[whom.NetworkId] = Game.GameTimeTickCount;

                    if (_menuhandler.GetValue <bool>(_menu, "ping"))
                    {
                        TacticalMap.SendPing(PingCategory.Danger, whom.Position);
                    }
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Executes every time the core sends a tick request
        /// </summary>
        /// <param name="args">The empty event data</param>
        private static void OnTick(EventArgs args)
        {
            if (MainMenu["button"])
            {
                Illuminati(Game.CursorPos);
                return;
            }

            if (!MainMenu["active"])
            {
                return;
            }

            if (MainMenu["polygon"])
            {
                Illuminati(targetHero.Position);
                return;
            }

            var time = Game.Time.ToTicks();

            if (lastPingTime + MainMenu.GetMenu("advanced")["delay"] > time)
            {
                return;
            }

            Pinged(time);

            TacticalMap.SendPing(MainMenu["pingtype"].Enum <PingCategory>(), Randomizer.Randomize(targetHero.Position.ToVector2(), MainMenu.GetMenu("advanced")["difference"]));

            if (MainMenu.GetMenu("advanced")["delay.rand"])
            {
                MainMenu.GetMenu("advanced")["delay"].Int = Random.Next(2000, 10000);
            }
        }
Exemplo n.º 5
0
 private static void OnPositionUpdate_OnUpdate(Unit.OnPositionUpdate.UpdatedPosition args)
 {
     if (args.FromFOW && !args.unit.IsAlly && !args.unit.IsDead)
     {
         Console.WriteLine($"Tracked: {args.unit.BaseSkinName}");
         TacticalMap.SendPing(PingCategory.Danger, args.After);
     }
 }
Exemplo n.º 6
0
 public static void Ping(PingCategory cat, GameObject target)
 {
     if (_lastPing > Game.Time)
     {
         return;
     }
     _lastPing = Game.Time + .8f;
     Core.DelayAction(() => TacticalMap.SendPing(cat, target), RandGen.R.Next(150, 400));
 }
Exemplo n.º 7
0
 public static void Ping(PingCategory cat, Vector3 pos)
 {
     if (lastPing > Game.Time)
     {
         return;
     }
     lastPing = Game.Time + .8f;
     Core.DelayAction(() => TacticalMap.SendPing(cat, pos), RandGen.r.Next(150, 400));
 }
Exemplo n.º 8
0
        private static void SendPing(Vector3 position)
        {
            Menu menu = MenuHandler.PingMenu;

            foreach (Vector3 pos in GetShapePositions(menu.GetComboBoxText("Ping Shape:"), position))
            {
                TacticalMap.SendPing((PingCategory)(menu.GetComboBoxValue("Ping Type:") + 1), pos);
            }
            timeOfLastPing = Game.Time;
        }
 public static void Ping(PingCategory cat, GameObject target)
 {
     if (MainMenu.GetMenu("AB").Get <CheckBox>("disablepings").CurrentValue)
     {
         return;
     }
     if (_lastPing > Game.Time)
     {
         return;
     }
     _lastPing = Game.Time + 1.8f;
     Core.DelayAction(() => TacticalMap.SendPing(cat, target), RandGen.R.Next(450, 800));
 }
Exemplo n.º 10
0
 private static void PingGround(Vector3 point, PingCategory pingtype)
 {
     if (point.Distance(Player.Instance.ServerPosition) > 1000)
     {
         return;
     }
     if (Environment.TickCount - LastPing < Rnd.Next(100, 1100) || NumberOfPings >= Rnd.Next(Math.Max(1, Config["maxpings"].Cast <Slider>().CurrentValue / 2), Config["maxpings"].Cast <Slider>().CurrentValue))
     {
         return;
     }
     LastPing = Environment.TickCount;
     NumberOfPings++;
     TacticalMap.SendPing(pingtype, point);
 }
Exemplo n.º 11
0
 private static void PingTarget(Obj_AI_Base target)
 {
     if (!target.IsValidTarget(1000))
     {
         return;
     }
     if (Environment.TickCount - LastPing < Rnd.Next(100, 1100) || NumberOfPings >= Rnd.Next(Math.Max(1, Config["maxpings"].Cast <Slider>().CurrentValue / 2), Config["maxpings"].Cast <Slider>().CurrentValue))
     {
         return;
     }
     LastPing = Environment.TickCount;
     NumberOfPings++;
     TacticalMap.SendPing(PingCategory.Normal, target);
 }
Exemplo n.º 12
0
        private static void SendPing(GankInfo gank)
        {
            if (gank.Sender.IsMe || PingDelay > Core.GameTickCount - gank.LastPinged || !menu.CheckBoxValue("ping"))
            {
                return;
            }

            var local = menu.ComboBoxValue("pingmode") == 0;

            if (local)
            {
                TacticalMap.ShowPing(pingtype(gank), gank.Sender, true);
            }
            else
            {
                TacticalMap.SendPing(pingtype(gank), gank.Sender);
            }
            gank.LastPinged = Core.GameTickCount;
        }
Exemplo n.º 13
0
        private static void KSLogic(EventArgs args)
        {
            if (Menu["W"]["WTap"].GetValue <MenuKeyBind>().Active)
            {
                if (W.IsReady())
                {
                    var WTarget = GetTarget(W.Range, W.DamageType);

                    if (W.GetPrediction(WTarget).Hitchance >= HitChance.High)
                    {
                        W.Cast(W.GetPrediction(WTarget, true).UnitPosition);
                    }
                }
            }
            if (Menu["Q"]["KillStealQ"].GetValue <MenuBool>())
            {
                if (Q.IsReady())
                {
                    var QTarget = GetTarget(Q.Range, Q.DamageType);

                    if (QTarget.Health <= Q.GetDamage(QTarget))
                    {
                        Q.Cast(QTarget);
                    }
                }
            }
            if (Menu["W"]["KSW"].GetValue <MenuBool>())
            {
                if (W.IsReady())
                {
                    var WTarget = GetTarget(W.Range, W.DamageType);

                    if (WTarget.Health <= W.GetDamage(WTarget) && W.GetPrediction(WTarget).Hitchance >= HitChance.VeryHigh)
                    {
                        W.Cast(W.GetPrediction(WTarget, true).UnitPosition);
                    }
                }
            }
            foreach (var e in GameObjects.Get <AIHeroClient>().Where(x => x.IsValidTarget() && x.Health
                                                                     <= R.GetDamage(x) * 3 && !x.IsZombie && !x.IsDead && !x.IsDead))
            {
                if (LasPing <= Variables.TickCount && Menu["R"]["Ping"])
                {
                    LasPing = Variables.TickCount + 3000;
                    TacticalMap.SendPing(PingCategory.Danger, e);
                }
            }
            if (Menu["E"]["ETap"].GetValue <MenuKeyBind>().Active)
            {
                if (E.IsReady())
                {
                    var ETarget = GetTarget(E.Range, E.DamageType);

                    if (!ETarget.IsDead && R.GetPrediction(ETarget).Hitchance >= HitChance.High)
                    {
                        E.Cast(R.GetPrediction(ETarget, true).UnitPosition);
                    }
                }
            }
            if (Menu["R"]["RTap"].GetValue <MenuKeyBind>().Active)
            {
                if (R.IsReady() && R.Instance.Name == StartR)
                {
                    var RTarget = GetTarget(R.Range, R.DamageType);

                    if (RTarget.Health <= R.GetDamage(RTarget) * 3 && !RTarget.IsZombie && !RTarget.IsDead &&
                        R.GetPrediction(RTarget).Hitchance >= HitChance.VeryHigh)
                    {
                        if (Items.CanUseItem(3363))
                        {
                            Items.UseItem(3363, RTarget.Position);
                        }
                        R.Cast(R.GetPrediction(RTarget, true).UnitPosition);
                    }
                }
            }
            if (Menu["R"]["RTap"].GetValue <MenuKeyBind>().Active)
            {
                if (Q.IsReady() && R.Instance.Name == IsCastingR)
                {
                    var RTarget = GetTarget(R.Range, R.DamageType);

                    if (Items.CanUseItem(3363))
                    {
                        Items.UseItem(3363, RTarget.Position);
                    }
                    R.Cast(R.GetPrediction(RTarget, true).UnitPosition);
                }
            }
        }
Exemplo n.º 14
0
        private static void Misc()
        {
            AIHeroClient target = TargetSelector.GetTarget(1100, DamageType.Magical, Player.Instance.Position);

            if (target != null && target.ValidTarget(1100))
            {
                if (check(misc, "KSQ") && DemSpells.Q.CanCast(target) && Prediction.Health.GetPrediction(target, DemSpells.Q.CastDelay) > 0f &&
                    target.Health < myhero.GetSpellDamage(target, SpellSlot.Q, DamageLibrary.SpellStages.Default) && DemSpells.Q.Cast())
                {
                    return;
                }
                if (check(misc, "KSE") && DemSpells.E.CanCast(target) && target.Health < myhero.GetSpellDamage(target, SpellSlot.E, DamageLibrary.SpellStages.Default) &&
                    Prediction.Health.GetPrediction(target, 1000 * (int)(target.Distance(myhero.Position, false) / DemSpells.E.Speed) + DemSpells.E.CastDelay) > 0f &&
                    DemSpells.E.GetPrediction(target).HitChancePercent >= slider(pred, "EPred") && DemSpells.E.Cast(DemSpells.E.GetPrediction(target).CastPosition))
                {
                    return;
                }

                if (Ignite != null && check(misc, "autoign") && Ignite.IsReady() && target.IsValidTarget(Ignite.Range) &&
                    myhero.GetSummonerSpellDamage(target, DamageLibrary.SummonerSpells.Ignite) > target.Health && Ignite.Cast(target))
                {
                    return;
                }
            }

            if (Smite != null && Smite.IsReady() && key(jungleclear, "SMITEKEY"))
            {
                IEnumerable <Obj_AI_Minion> Monsters = EntityManager.MinionsAndMonsters.GetJungleMonsters(myhero.Position, 500).Where(x => x.IsValidTarget(500) && !x.IsDead &&
                                                                                                                                      !x.Name.ToLower().Contains("mini"));

                if (Monsters != null)
                {
                    using (IEnumerator <Obj_AI_Minion> list = Monsters.GetEnumerator())
                    {
                        Obj_AI_Minion monster = list.Current;

                        if (Smite.CanCast(monster) && monster.Health < myhero.GetSummonerSpellDamage(monster, DamageLibrary.SummonerSpells.Smite) && Smite.Cast(monster))
                        {
                            return;
                        }
                    }
                    return;
                }
            }

            if (check(misc, "AUTOPOT") && (!myhero.HasBuff("RegenerationPotion") && !myhero.HasBuff("ItemMiniRegenPotion") && !myhero.HasBuff("ItemCrystalFlask")) &&
                myhero.HealthPercent <= slider(misc, "POTMIN"))
            {
                if (Item.HasItem(Potion.Id) && Item.CanUseItem(Potion.Id))
                {
                    Potion.Cast();
                }

                else if (Item.HasItem(Biscuit.Id) && Item.CanUseItem(Biscuit.Id))
                {
                    Biscuit.Cast();
                }

                else if (Item.HasItem(RPotion.Id) && Item.CanUseItem(RPotion.Id))
                {
                    RPotion.Cast();
                }
            }

            IEnumerable <Obj_AI_Minion> ValidCrystals = Crystals.Where(x => EntityManager.Heroes.Enemies.Where(y => y.Distance(x) < 230 &&
                                                                                                               y.HasBuff("skarnerpassivecrystalbuffcooldown"))
                                                                       .Any());


            if (check(misc, "PING") && !Pinged && ValidCrystals.Any())
            {
                using (IEnumerator <Obj_AI_Minion> list = ValidCrystals.GetEnumerator())
                {
                    if (list.MoveNext())
                    {
                        Obj_AI_Minion crystal = list.Current;
                        TacticalMap.SendPing(PingCategory.Fallback, crystal.Position);
                        Pinged = true;
                        Core.DelayAction(() => { Pinged = false; }, slider(misc, "PINGDELAY") * 1000);
                        return;
                    }
                }
                return;
            }


            if (key(misc, "SHIELDKEY") && DemSpells.W.IsReady() && myhero.HealthPercent <= slider(misc, "SMINH") && myhero.ManaPercent >= slider(misc, "SMINM"))
            {
                IEnumerable <AIHeroClient> list = EntityManager.Heroes.Enemies.Where(x => x.Distance(myhero.Position) < 400);

                if (list.Any() && list.Count() >= slider(misc, "SMINE") && DemSpells.W.Cast())
                {
                    return;
                }
            }

            if (check(misc, "skinhax"))
            {
                myhero.SetSkinId((int)misc["skinID"].Cast <ComboBox>().CurrentValue);
            }
        }
Exemplo n.º 15
0
        private static void GameOnOnNotify(GameNotifyEventArgs args)
        {
            /*
             *
             *  Mastery Emote
             *
             */
            if (generalMenu["useMastery"].Cast <CheckBox>().CurrentValue)
            {
                // On champion kills
                if (masteryEmoteMenu["emoteOnKill"].Cast <CheckBox>().CurrentValue&&
                    args.EventId == GameEventId.OnChampionKill && args.NetworkId == user.NetworkId)
                {
                    Core.DelayAction(() => Chat.Say("/masterybadge"), GenerateDelay());
                }

                // On death
                if (masteryEmoteMenu["emoteOnDeath"].Cast <CheckBox>().CurrentValue&& args.EventId == GameEventId.OnDie &&
                    args.NetworkId == user.NetworkId)
                {
                    Core.DelayAction(() => Chat.Say("/masterybadge"), GenerateDelay());
                }

                // On assists
                if (masteryEmoteMenu["emoteOnAssist"].Cast <CheckBox>().CurrentValue&&
                    args.EventId == GameEventId.OnChampionKill &&
                    ObjectManager.GetUnitByNetworkId <AIHeroClient>(args.NetworkId).IsAlly&& user.Assists > badgeAssists)
                {
                    badgeAssists++;
                    Core.DelayAction(() => Chat.Say("/masterybadge"), GenerateDelay());
                }

                // On ace
                if (masteryEmoteMenu["emoteOnAce"].Cast <CheckBox>().CurrentValue&& args.EventId == GameEventId.OnAce &&
                    ObjectManager.GetUnitByNetworkId <AIHeroClient>(args.NetworkId).IsAlly)
                {
                    Core.DelayAction(() => Chat.Say("/masterybadge"), GenerateDelay());
                }
            }

            /*
             *
             *  Laugh
             *
             */
            if (generalMenu["useLaugh"].Cast <CheckBox>().CurrentValue)
            {
                // On champion kills
                if (laughMenu["laughOnKill"].Cast <CheckBox>().CurrentValue&& args.EventId == GameEventId.OnChampionKill &&
                    args.NetworkId == user.NetworkId)
                {
                    Core.DelayAction(() => Player.DoEmote(Emote.Laugh), GenerateDelay());
                }

                // On death
                if (laughMenu["laughOnDeath"].Cast <CheckBox>().CurrentValue&& args.EventId == GameEventId.OnDie &&
                    args.NetworkId == user.NetworkId)
                {
                    Core.DelayAction(() => Player.DoEmote(Emote.Laugh), GenerateDelay());
                }

                // On assists
                if (laughMenu["laughOnAssist"].Cast <CheckBox>().CurrentValue&&
                    args.EventId == GameEventId.OnChampionKill &&
                    ObjectManager.GetUnitByNetworkId <AIHeroClient>(args.NetworkId).IsAlly&& user.Assists > laughAssists)
                {
                    laughAssists++;
                    Core.DelayAction(() => Player.DoEmote(Emote.Laugh), GenerateDelay());
                }

                // On ace
                if (laughMenu["laughOnAce"].Cast <CheckBox>().CurrentValue&& args.EventId == GameEventId.OnAce &&
                    ObjectManager.GetUnitByNetworkId <AIHeroClient>(args.NetworkId).IsAlly)
                {
                    Core.DelayAction(() => Player.DoEmote(Emote.Laugh), GenerateDelay());
                }
            }

            /*
             *
             * Ping
             *
             */

            // On ally kill
            if (generalMenu["useOther"].Cast <CheckBox>().CurrentValue&& otherMenu["pingOnAllyDeath"].Cast <CheckBox>().CurrentValue&& args.EventId == GameEventId.OnDie)
            {
                foreach (var ally in EntityManager.Heroes.Allies)
                {
                    if (ally.VisibleOnScreen && !ally.IsMe && args.NetworkId == ally.NetworkId)
                    {
                        Core.DelayAction(() => TacticalMap.SendPing(PingCategory.EnemyMissing, ally.Position), GenerateDelay());
                        return;
                    }
                }
            }
        }