示例#1
0
        private static void UseW()
        {
            if (Player.HealthPercent <= Misc.GetSlider("Healing.MinHPME") || Misc.Active("onlywincdmg"))
            {
                return;
            }

            if (Spells[SpellSlot.W].IsReady())
            {
                var alliesinneed =
                    HeroManager.Allies.Where(
                        hero => !hero.IsMe && !hero.IsDead && (!Misc.Active("Misc.Nohealshop") || !hero.InShop()) && !hero.IsZombie && hero.Distance(Player) <= Spells[SpellSlot.W].Range &&
                        Misc.Active("w" + hero.ChampionName) &&
                        hero.HealthPercent <= Misc.GetSlider("wpct" + hero.ChampionName) && hero.HealthPercent >= Misc.GetSlider("Healing.MinHP"))
                    .ToList();

                if (Misc.Active("wonlyadc") && alliesinneed.Any(x => x.NetworkId == myADC.NetworkId))
                {
                    Spells[SpellSlot.W].CastOnUnit(myADC);
                }

                else if (!Misc.Active("wonlyadc"))
                {
                    AIHeroClient allytoheal = null;

                    allytoheal = SorakaMenu.PriorityType() == SorakaMenu.HealPriority.PriorityList ? alliesinneed.MaxOrDefault(h => h.GetSetPriority()) : alliesinneed.MinOrDefault(x => x.HealthPercent);

                    if (allytoheal != null)
                    {
                        Spells[SpellSlot.W].CastOnUnit(allytoheal);
                    }
                }
            }
        }
示例#2
0
        //private static bool done;

        /*
         * private static void PrintSData()
         * {
         *  if (done) return;
         *  foreach (var spell in ObjectManager.Player.Spellbook.Spells)
         *  {
         *      var sdata = spell.SData;
         *      Chat.Print("spell " + spell.Slot + " speed " + sdata.MissileSpeed + " delay " + sdata.DelayCastOffsetPercent + " width " + sdata.LineWidth + " range " + sdata.CastRange);
         *  }
         *  done = true;
         * }
         */

        private static void SorakaMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.BaseSkinName != "Soraka")
            {
                return;
            }

            Config = SorakaMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();


            AntiGapcloser.OnEnemyGapcloser     += OnGapClose;
            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Obj_AI_Base.OnSpellCast        += DangerDetector;
            Obj_AI_Base.OnProcessSpellCast += DangerDetector;

            Orbwalking.BeforeAttack += BeforeAttack;

            Game.OnUpdate  += OnUpdate;
            Drawing.OnDraw += OnDraw;

            Chat.Print("SephSoraka Loaded!");
        }
示例#3
0
        private static void UseW()
        {
            if (Spells[SpellSlot.W].IsReady())
            {
                var alliesinneed =
                    HeroManager.Allies.Where(
                        hero => !hero.IsMe &&
                        !hero.IsDead && (!Misc.Active("Misc.Nohealshop") || !hero.InShop()) && !hero.IsZombie && hero.Distance(Player) <= Spells[SpellSlot.W].Range &&
                        Misc.Active("w" + hero.ChampionName) &&
                        hero.HealthPercent <= Misc.GetSlider("wpct" + hero.ChampionName))
                    .ToList();

                if (Misc.Active("wonlyadc") && alliesinneed.Contains(myADC) && Player.Distance(myADC) <= Spells[SpellSlot.W].Range)
                {
                    Spells[SpellSlot.W].CastOnUnit(myADC);
                }

                else if (!Misc.Active("wonlyadc"))
                {
                    Obj_AI_Hero allytoheal = null;

                    allytoheal = SorakaMenu.PriorityType() == SorakaMenu.HealPriority.PriorityList ? alliesinneed.MaxOrDefault(h => h.GetSetPriority()) : alliesinneed.MinOrDefault(x => x.HealthPercent);

                    if (allytoheal != null)
                    {
                        Spells[SpellSlot.W].CastOnUnit(allytoheal);
                    }
                }
            }
        }