Пример #1
0
        private static void OnLoadingComplete(EventArgs args)
        {
            if (Player.ChampionName != "Swain")
            {
                return;
            }
            Chat.Print("Swain The Troll Loaded!!", Color.Gold);
            Chat.Print("Version 1 (1/8/2016", Color.Gold);
            Chat.Print("HF And Dont Troll And Feed Kappa!!", Color.Gold);

            SwainTheTrollMeNu.LoadMenu();
            Game.OnTick += GameOnTick;
            Activator.LoadSpells();
            Game.OnUpdate += OnGameUpdate;

            #region Skill

            Q = new Spell.Skillshot(SpellSlot.Q, 700, SkillShotType.Circular, 250, 1250, 325);
            W = new Spell.Skillshot(SpellSlot.W, 900, SkillShotType.Circular, 500, 1250, 125);
            E = new Spell.Targeted(SpellSlot.E, 625);
            R = new Spell.Active(SpellSlot.R, 700);

            #endregion

            Gapcloser.OnGapcloser            += AntiGapCloser;
            Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell;
            Drawing.OnDraw      += GameOnDraw;
            GameObject.OnCreate += OnCreateObject;
            GameObject.OnDelete += OnDeleteObject;
            DamageIndicator.Initialize(SpellDamage.GetTotalDamage);
        }
Пример #2
0
 private static void Heal()
 {
     if (Activator.Heal != null && Activator.Heal.IsReady() &&
         Player.HealthPercent <= SwainTheTrollMeNu.SpellsHealHp() &&
         Player.CountEnemiesInRange(600) > 0 && Activator.Heal.IsReady())
     {
         Activator.Heal.Cast();
     }
 }
Пример #3
0
        private static void Ignite()
        {
            var autoIgnite = TargetSelector.GetTarget(Activator.Ignite.Range, DamageType.True);

            if (autoIgnite != null && autoIgnite.Health <= Player.GetSpellDamage(autoIgnite, Activator.Ignite.Slot) ||
                autoIgnite != null && autoIgnite.HealthPercent <= SwainTheTrollMeNu.SpellsIgniteFocus())
            {
                Activator.Ignite.Cast(autoIgnite);
            }
        }
Пример #4
0
 void OnGameUpdate(EventArgs args)
 {
     if (Activator.Heal != null)
     {
         Heal();
     }
     if (Activator.Ignite != null)
     {
         Ignite();
     }
     if (SwainTheTrollMeNu.CheckSkin())
     {
         if (SwainTheTrollMeNu.SkinId() != CurrentSkin)
         {
             Player.SetSkinId(SwainTheTrollMeNu.SkinId());
             CurrentSkin = SwainTheTrollMeNu.SkinId();
         }
     }
 }
Пример #5
0
 void AutoPotions()
 {
     if (SwainTheTrollMeNu.SpellsPotionsCheck() && !Player.IsInShopRange() &&
         Player.HealthPercent <= SwainTheTrollMeNu.SpellsPotionsHp() &&
         !(Player.HasBuff("RegenerationPotion") || Player.HasBuff("ItemCrystalFlaskJungle") ||
           Player.HasBuff("ItemMiniRegenPotion") || Player.HasBuff("ItemCrystalFlask") ||
           Player.HasBuff("ItemDarkCrystalFlask")))
     {
         if (Activator.HuntersPot.IsReady() && Activator.HuntersPot.IsOwned())
         {
             Activator.HuntersPot.Cast();
         }
         if (Activator.CorruptPot.IsReady() && Activator.CorruptPot.IsOwned())
         {
             Activator.CorruptPot.Cast();
         }
         if (Activator.Biscuit.IsReady() && Activator.Biscuit.IsOwned())
         {
             Activator.Biscuit.Cast();
         }
         if (Activator.HpPot.IsReady() && Activator.HpPot.IsOwned())
         {
             Activator.HpPot.Cast();
         }
         if (Activator.RefillPot.IsReady() && Activator.RefillPot.IsOwned())
         {
             Activator.RefillPot.Cast();
         }
     }
     if (SwainTheTrollMeNu.SpellsPotionsCheck() && !Player.IsInShopRange() &&
         Player.ManaPercent <= SwainTheTrollMeNu.SpellsPotionsM() &&
         !(Player.HasBuff("RegenerationPotion") || Player.HasBuff("ItemCrystalFlaskJungle") ||
           Player.HasBuff("ItemMiniRegenPotion") || Player.HasBuff("ItemCrystalFlask") ||
           Player.HasBuff("ItemDarkCrystalFlask")))
     {
         if (Activator.CorruptPot.IsReady() && Activator.CorruptPot.IsOwned())
         {
             Activator.CorruptPot.Cast();
         }
     }
 }
Пример #6
0
        private static void GameOnDraw(EventArgs args)
        {
            if (SwainTheTrollMeNu.Nodraw())
            {
                return;
            }

            {
                if (SwainTheTrollMeNu.DrawingsQ())
                {
                    new Circle {
                        Color = Color.Gold, Radius = Q.Range, BorderWidth = 2f
                    }.Draw(Player.Position);
                }
                if (SwainTheTrollMeNu.DrawingsW())
                {
                    new Circle {
                        Color = Color.Gold, Radius = W.Range, BorderWidth = 2f
                    }.Draw(Player.Position);
                }
                if (SwainTheTrollMeNu.DrawingsE())
                {
                    new Circle {
                        Color = Color.Gold, Radius = E.Range, BorderWidth = 2f
                    }.Draw(Player.Position);
                }
                if (SwainTheTrollMeNu.DrawingsR())
                {
                    new Circle {
                        Color = Color.Gold, Radius = R.Range, BorderWidth = 2f
                    }.Draw(Player.Position);
                }
                DamageIndicator.HealthbarEnabled =
                    SwainTheTrollMeNu.DrawMeNu["healthbar"].Cast <CheckBox>().CurrentValue;
                DamageIndicator.PercentEnabled = SwainTheTrollMeNu.DrawMeNu["percent"].Cast <CheckBox>().CurrentValue;
            }
        }