context: #region
  using System;
  using LeagueSharp;
  using System.Linq;
  using LeagueSharp.Common;
  
  #endregion
  
  // Server Potition Fixed
  using EloBuddy; 
   using LeagueSharp.Common; 
   namespace D_Graves
  {
      class Program
      {
          private const string ChampionName = "Graves";
  
          private static Orbwalking.Orbwalker _orbwalker;
  
          private static Spell _q, _w, _e, _r;
  
          private static Menu _config;
  
          private static AIHeroClient _player;
  
          private static Int32 _lastSkin;
  
          private static Items.Item _youmuu, _blade, _bilge;
  
          private static readonly int[] SmitePurple = { 3713, 3726, 3725, 3726, 3723 };
          private static readonly int[] SmiteGrey = { 3711, 3722, 3721, 3720, 3719 };
          private static readonly int[] SmiteRed = { 3715, 3718, 3717, 3716, 3714 };
          private static readonly int[] SmiteBlue = { 3706, 3710, 3709, 3708, 3707 };
  
          public static void Game_OnGameLoad()
          {
              _player = ObjectManager.Player;
              if (ObjectManager.Player.BaseSkinName != ChampionName) return;
  
              _q = new Spell(SpellSlot.Q, 950F);
              _w = new Spell(SpellSlot.W, 950f);
              _e = new Spell(SpellSlot.E, 425f);
              _r = new Spell(SpellSlot.R, 1200f);
  
              _q.SetSkillshot(0.26f, 10f*2*(float) Math.PI/180, 1950, false, SkillshotType.SkillshotCone);
              _w.SetSkillshot(0.30f, 250f, 1650f, false, SkillshotType.SkillshotCircle);
              _r.SetSkillshot(0.22f, 150f, 2100, true, SkillshotType.SkillshotLine);
  
              _youmuu = new Items.Item(3142, 10);
              _bilge = new Items.Item(3144, 450f);
              _blade = new Items.Item(3153, 450f);
              //D Graves
              _config = new Menu("D-Graves", "D-Graves", true);
  
              //TargetSelector
              var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
              TargetSelector.AddToMenu(targetSelectorMenu);
              _config.AddSubMenu(targetSelectorMenu);
  
              //Orbwalker
              _config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
              _orbwalker = new Orbwalking.Orbwalker(_config.SubMenu("Orbwalking"));
  
              //Combo
              _config.AddSubMenu(new Menu("Combo", "Combo"));
              _config.SubMenu("Combo").AddItem(new MenuItem("UseQC", "Use Q")).SetValue(true);
              _config.SubMenu("Combo").AddItem(new MenuItem("UseWC", "Use W")).SetValue(true);
              _config.SubMenu("Combo").AddItem(new MenuItem("UseEC", "Use E")).SetValue(true);
              _config.SubMenu("Combo").AddItem(new MenuItem("diveintower", "Dive In tower with E")).SetValue(true);
              _config.SubMenu("Combo")
                  .AddItem(new MenuItem("ActiveCombo", "Combo").SetValue(new KeyBind(32, KeyBindType.Press)));
  
              //Ulti Factions
              _config.AddSubMenu(new Menu("R Factions", "R Factions"));
              _config.SubMenu("R Factions").AddSubMenu(new Menu("Use R combo", "Use R combo"));
              _config.SubMenu("R Factions")
                  .SubMenu("Use R combo")
                  .AddItem(new MenuItem("UseRcombo", "Use R in Combo"))
                  .SetValue(true);
              _config.SubMenu("R Factions")
                  .SubMenu("Use R combo")
                  .AddItem(new MenuItem("UseRrush", "Rush R if ComboDmg>=Tagret HP"))
                  .SetValue(true);
              _config.SubMenu("R Factions")
                  .SubMenu("Use R combo")
                  .AddItem(new MenuItem("UseRC", "Use R if R.Dmg>Targ. HP"))
                  .SetValue(true);
              _config.SubMenu("R Factions")
                  .SubMenu("Use R combo")
                  .AddItem(new MenuItem("UseRE", "Auto R if Hit X Enemys"))
                  .SetValue(true);
              _config.SubMenu("R Factions")
                  .SubMenu("Use R combo")
                  .AddItem(new MenuItem("MinTargets", "Auto R if Hit X Enemys").SetValue(new Slider(2, 1, 5)));
              _config.SubMenu("R Factions").SubMenu("Use R combo").AddItem(new MenuItem("", "Use R in Targets Below"));
              foreach (var enemy in ObjectManager.Get<AIHeroClient>().Where(enemy => enemy.Team != _player.Team))
                  _config.SubMenu("R Factions")
                      .SubMenu("Use R combo")
                      .AddItem(new MenuItem("castR" + enemy.BaseSkinName, enemy.BaseSkinName).SetValue(false));
              _config.SubMenu("R Factions").AddSubMenu(new Menu("Use R killsteal", "Use R killsteal"));
              _config.SubMenu("R Factions")
                  .SubMenu("Use R killsteal")
                  .AddItem(new MenuItem("UseRM", "Use R KillSteal"))
                  .SetValue(true);
              _config.SubMenu("R Factions").SubMenu("Use R killsteal").AddItem(new MenuItem("", "Use R in Targets Below"));
              foreach (var enemy in ObjectManager.Get<AIHeroClient>().Where(enemy => enemy.Team != _player.Team))
                  _config.SubMenu("R Factions")
                      .SubMenu("Use R killsteal")
                      .AddItem(new MenuItem("castRkill" + enemy.BaseSkinName, enemy.BaseSkinName).SetValue(false));
  
  
              //Harass
              _config.AddSubMenu(new Menu("Harass", "Harass"));
              _config.SubMenu("Harass").AddItem(new MenuItem("UseQH", "Use Q")).SetValue(true);
              _config.SubMenu("Harass").AddItem(new MenuItem("UseWH", "Use W")).SetValue(true);
              _config.SubMenu("Harass")
                  .AddItem(
                      new MenuItem("harasstoggle", "AutoHarass (toggle)").SetValue(new KeyBind("G".ToCharArray()[0],
                          KeyBindType.Toggle)));
              _config.SubMenu("Harass")
                  .AddItem(new MenuItem("Harrasmana", "Minimum Mana").SetValue(new Slider(60, 1, 100)));
              _config.SubMenu("Harass")
                  .AddItem(
                      new MenuItem("ActiveHarass", "Harass!").SetValue(new KeyBind("C".ToCharArray()[0],
                          KeyBindType.Press)));
  
              //LaneClear
              _config.AddSubMenu(new Menu("Farm", "Farm"));
              _config.SubMenu("Farm").AddItem(new MenuItem("UseQL", "Q LaneClear")).SetValue(true);
              _config.SubMenu("Farm").AddItem(new MenuItem("UseWL", "W LaneClear")).SetValue(true);
              _config.SubMenu("Farm").AddItem(new MenuItem("UseQLH", "Q LastHit")).SetValue(true);
              _config.SubMenu("Farm").AddItem(new MenuItem("UseWLH", "W LastHit")).SetValue(true);
              _config.SubMenu("Farm").AddItem(new MenuItem("UseQJ", "Q Jungle")).SetValue(true);
              _config.SubMenu("Farm").AddItem(new MenuItem("UseWJ", "W Jungle")).SetValue(true);
              _config.SubMenu("Farm").AddItem(new MenuItem("Lanemana", "Minimum Mana").SetValue(new Slider(60, 1, 100)));
              _config.SubMenu("Farm")
                  .AddItem(
                      new MenuItem("ActiveLast", "LastHit!").SetValue(new KeyBind("X".ToCharArray()[0], KeyBindType.Press)));
              _config.SubMenu("Farm")
                  .AddItem(
                      new MenuItem("ActiveLane", "LaneClear!").SetValue(new KeyBind("V".ToCharArray()[0],
                          KeyBindType.Press)));
  
              _config.AddSubMenu(new Menu("items", "items"));
              _config.SubMenu("items").AddSubMenu(new Menu("Offensive", "Offensive"));
              _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Youmuu", "Use Youmuu's")).SetValue(true);
              _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Bilge", "Use Bilge")).SetValue(true);
              _config.SubMenu("items")
                  .SubMenu("Offensive")
                  .AddItem(new MenuItem("BilgeEnemyhp", "If Enemy Hp <").SetValue(new Slider(85, 1, 100)));
              _config.SubMenu("items")
                  .SubMenu("Offensive")
                  .AddItem(new MenuItem("Bilgemyhp", "Or your Hp < ").SetValue(new Slider(85, 1, 100)));
              _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Blade", "Use Blade")).SetValue(true);
              _config.SubMenu("items")
                  .SubMenu("Offensive")
                  .AddItem(new MenuItem("BladeEnemyhp", "If Enemy Hp <").SetValue(new Slider(85, 1, 100)));
              _config.SubMenu("items")
                  .SubMenu("Offensive")
                  .AddItem(new MenuItem("Blademyhp", "Or Your  Hp <").SetValue(new Slider(85, 1, 100)));
              _config.SubMenu("items").AddSubMenu(new Menu("Potions", "Potions"));
              _config.SubMenu("items")
                  .SubMenu("Potions")
                  .AddItem(new MenuItem("usehppotions", "Use Healt potion/Flask/Biscuit"))
                  .SetValue(true);
              _config.SubMenu("items")
                  .SubMenu("Potions")
                  .AddItem(new MenuItem("usepotionhp", "If Health % <").SetValue(new Slider(35, 1, 100)));
              _config.SubMenu("items")
                  .SubMenu("Potions")
                  .AddItem(new MenuItem("usemppotions", "Use Mana potion/Flask/Biscuit"))
                  .SetValue(true);
              _config.SubMenu("items")
                  .SubMenu("Potions")
                  .AddItem(new MenuItem("usepotionmp", "If Mana % <").SetValue(new Slider(35, 1, 100)));
  
              //Misc
              _config.AddSubMenu(new Menu("Misc", "Misc"));
              _config.SubMenu("Misc").AddItem(new MenuItem("UseQM", "Use Q KillSteal")).SetValue(true);
              _config.SubMenu("Misc").AddItem(new MenuItem("UseWM", "Use W KillSteal")).SetValue(true);
              _config.SubMenu("Misc").AddItem(new MenuItem("Gap_E", "GapClosers W")).SetValue(true);
              _config.SubMenu("Misc").AddItem(new MenuItem("skinG", "Use Custom Skin").SetValue(true));
              _config.SubMenu("Misc").AddItem(new MenuItem("skinGraves", "Skin Changer").SetValue(new Slider(4, 1, 6)));
              _config.SubMenu("Misc").AddItem(new MenuItem("usePackets", "Usepackes")).SetValue(true);
  
              //HitChance
              _config.AddSubMenu(new Menu("HitChance", "HitChance"));
              _config.SubMenu("HitChance").AddSubMenu(new Menu("Combo", "Combo"));
              _config.SubMenu("HitChance")
                  .SubMenu("Combo")
                  .AddItem(
                      new MenuItem("Qchange", "Q Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance")
                  .SubMenu("Combo")
                  .AddItem(
                      new MenuItem("Wchange", "W Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance")
                  .SubMenu("Combo")
                  .AddItem(
                      new MenuItem("Rchange", "R Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance").AddSubMenu(new Menu("Harass", "Harass"));
              _config.SubMenu("HitChance")
                  .SubMenu("Harass")
                  .AddItem(
                      new MenuItem("Qchangeharass", "Q Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance")
                  .SubMenu("Harass")
                  .AddItem(
                      new MenuItem("Wchangeharass", "W Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance").AddSubMenu(new Menu("KillSteal", "KillSteal"));
              _config.SubMenu("HitChance")
                  .SubMenu("KillSteal")
                  .AddItem(
                      new MenuItem("Qchangekill", "Q Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance")
                  .SubMenu("KillSteal")
                  .AddItem(
                      new MenuItem("Wchangekill", "W Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
              _config.SubMenu("HitChance")
                  .SubMenu("KillSteal")
                  .AddItem(
                      new MenuItem("Rchangekill", "R Hit").SetValue(
                          new StringList(new[] {"Low", "Medium", "High", "Very High"})));
  
              //Drawings
              _config.AddSubMenu(new Menu("Drawings", "Drawings"));
              _config.SubMenu("Drawings").AddItem(new MenuItem("DrawQ", "Draw Q")).SetValue(true);
              _config.SubMenu("Drawings").AddItem(new MenuItem("DrawW", "Draw W")).SetValue(true);
              _config.SubMenu("Drawings").AddItem(new MenuItem("DrawE", "Draw E")).SetValue(true);
              _config.SubMenu("Drawings").AddItem(new MenuItem("DrawR", "Draw R")).SetValue(true);
              _config.SubMenu("Drawings").AddItem(new MenuItem("CircleLag", "Lag Free Circles").SetValue(true));
              _config.SubMenu("Drawings")
                  .AddItem(new MenuItem("CircleQuality", "Circles Quality").SetValue(new Slider(100, 100, 10)));
              _config.SubMenu("Drawings")
                  .AddItem(new MenuItem("CircleThickness", "Circles Thickness").SetValue(new Slider(1, 10, 1)));
  
              _config.AddToMainMenu();
              Chat.Print("<font color='#881df2'>D-Graves by Diabaths</font> Loaded.");
              Game.OnUpdate += Game_OnUpdate;
              Drawing.OnDraw += Drawing_OnDraw;
              AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
              Orbwalking.AfterAttack += Orbwalking_AfterAttack;
              if (_config.Item("skinG").GetValue<bool>())
              {
                  GenModelPacket(_player.ChampionName, _config.Item("skinGraves").GetValue<Slider>().Value);
                  _lastSkin = _config.Item("skinGraves").GetValue<Slider>().Value;
              }
              Chat.Print(
                  "<font color='#FF0000'>If You like my work and want to support, and keep it always up to date plz donate via paypal in </font> <font color='#FF9900'>ssssssssssmith@hotmail.com</font> (10) S");
          }
  
          private static void Game_OnUpdate(EventArgs args)
          {
              if (_config.Item("skinG").GetValue<bool>() && SkinChanged())
              {
                  GenModelPacket(_player.ChampionName, _config.Item("skinGraves").GetValue<Slider>().Value);
                  _lastSkin = _config.Item("skinGraves").GetValue<Slider>().Value;
              }
              if (_config.Item("ActiveCombo").GetValue<KeyBind>().Active)
              {
                  Combo();
              }
              if ((_config.Item("ActiveHarass").GetValue<KeyBind>().Active || _config.Item("harasstoggle").GetValue<KeyBind>().Active) && (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Harrasmana").GetValue<Slider>().Value)
              {
                  Harass();
  
              }
              if (_config.Item("ActiveLane").GetValue<KeyBind>().Active && (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Lanemana").GetValue<Slider>().Value)
              {
                  Laneclear();
                  JungleClear();
  
              }
              if (_config.Item("ActiveLast").GetValue<KeyBind>().Active && (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Lanemana").GetValue<Slider>().Value)
              {
                  LastHit();
              }
  
              _player = ObjectManager.Player;
  
              _orbwalker.SetAttack(true);
  
              KillSteal();
              Usepotion();
          }
  
          private static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser)
          {
              if (_w.IsReady() && gapcloser.Sender.IsValidTarget(_w.Range) && _config.Item("Gap_E").GetValue<bool>())
                  if (gapcloser.Sender.IsMelee())
                  {
                    //  Chat.Print("melee");
                      _w.Cast(_player, Packets());
                  }
                  else
                  {
                    //  Chat.Print("normal");
                      _w.Cast(gapcloser.Sender, Packets());
                  }
          }
  
          static void GenModelPacket(string champ, int skinId)
          {
              Packet.S2C.UpdateModel.Encoded(new Packet.S2C.UpdateModel.Struct(_player.NetworkId, skinId, champ)).Process();
          }
  
          static bool SkinChanged()
          {
              return (_config.Item("skinGraves").GetValue<Slider>().Value != _lastSkin);
          }
          private static float ComboDamage(Obj_AI_Base enemy)
          {
              var damage = 0d;
  
              if (Items.HasItem(3077) && Items.CanUseItem(3077))
                  damage += _player.GetItemDamage(enemy, Damage.DamageItems.Tiamat);
              if (Items.HasItem(3074) && Items.CanUseItem(3074))
                  damage += _player.GetItemDamage(enemy, Damage.DamageItems.Hydra);
              if (Items.HasItem(3153) && Items.CanUseItem(3153))
                  damage += _player.GetItemDamage(enemy, Damage.DamageItems.Botrk);
              if (Items.HasItem(3144) && Items.CanUseItem(3144))
                  damage += _player.GetItemDamage(enemy, Damage.DamageItems.Bilgewater);
              if (_q.IsReady())
                  damage += _player.GetSpellDamage(enemy, SpellSlot.Q) * 1.3;
              if (_w.IsReady())
                  damage += _player.GetSpellDamage(enemy, SpellSlot.W);
              if (_r.IsReady())
                  damage += _player.GetSpellDamage(enemy, SpellSlot.R);
              damage += _player.GetAutoAttackDamage(enemy, true) * 2;
              return (float)damage;
          }
  
          private static void Combo()
          {
              var target = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical);
              var useQ = _config.Item("UseQC").GetValue<bool>();
              var useW = _config.Item("UseWC").GetValue<bool>();
              var useR = _config.Item("UseRC").GetValue<bool>();
              var autoR = _config.Item("UseRE").GetValue<bool>();
              var rushUlti = _config.Item("UseRrush").GetValue<bool>();
              var useRcombo = _config.Item("UseRcombo").GetValue<bool>();
              if (useQ && _q.IsReady())
              {
                  var t = TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical);
                  if (t != null && _player.Distance(t) < _q.Range - 70 && _q.GetPrediction(t).Hitchance >= Qchange())
                      _q.Cast(t, Packets(), true);
              }
              if (useW && _w.IsReady())
              {
                  var t = TargetSelector.GetTarget(_w.Range, TargetSelector.DamageType.Magical);
                  if (t != null && _player.Distance(t) < _w.Range && _w.GetPrediction(t).Hitchance >= Wchange())
                      _w.Cast(t, Packets(), true);
              }
              Fuckinge(target);
              if (_r.IsReady() && useRcombo)
              {
                  var t = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical);
                  if (_config.Item("castR" + t.BaseSkinName) != null &&
                      _config.Item("castR" + t.BaseSkinName).GetValue<bool>() == true && !t.HasBuff("JudicatorIntervention") && !t.HasBuff("Undying Rage") &&
                      _r.GetPrediction(t).Hitchance >= Rchange())
                  {
                      if (ComboDamage(t) > t.Health && rushUlti)
                      {
                          _r.Cast(t, Packets(), true);
                      }
                      if (_r.GetDamage(t) > t.Health && useR)
                      {
                          _r.Cast(t, Packets(), true);
                      }
                  }
              }
  
              if (_r.IsReady() && autoR && useRcombo)
              {
                  var t = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical);
                  if (ObjectManager.Get<AIHeroClient>().Count(hero => hero.IsValidTarget(_r.Range)) >=
                      _config.Item("MinTargets").GetValue<Slider>().Value
                      && _r.GetPrediction(t).Hitchance >= Rchange())
                      _r.Cast(t, Packets(), true);
              }
              UseItemes(target);
          }
          private static void Fuckinge(AIHeroClient eTarget)
          {
              var diveTower = _config.Item("diveintower").GetValue<bool>();
              if (LeagueSharp.Common.Utility.UnderTurret(eTarget) && !diveTower) return;
              var useE = _config.Item("UseEC").GetValue<bool>();
              
              if (useE && _e.IsReady())
              {
                  if (eTarget != null && _player.Distance(eTarget) > Orbwalking.GetRealAutoAttackRange(_player))
                      _e.Cast(eTarget.Position);
                  return;
              }
          }
          private static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
          {
              var useQ = _config.Item("UseQC").GetValue<bool>();
              var useW = _config.Item("UseWC").GetValue<bool>();
              var combo = _config.Item("ActiveCombo").GetValue<KeyBind>().Active;
              if (combo && unit.IsMe && (target is AIHeroClient))
              {
                  if (useQ && _q.IsReady())
                  {
                      var t = TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical);
                      if (t != null && _player.Distance(t) < _q.Range - 70 && _q.GetPrediction(t).Hitchance >= Qchange())
                          _q.Cast(t, Packets(), true);
                  }
                  if (useW && _w.IsReady())
                  {
                      var t = TargetSelector.GetTarget(_w.Range, TargetSelector.DamageType.Magical);
                      if (t != null && _player.Distance(t) < _w.Range && _w.GetPrediction(t).Hitchance >= Wchange())
                          _w.Cast(t, Packets(), true);
                  }
              }
          }
  
          private static void Harass()
          {
              var useQ = _config.Item("UseQH").GetValue<bool>();
              var useW = _config.Item("UseWH").GetValue<bool>();
  
              if (useQ && _q.IsReady())
              {
                  var t = TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical);
                  if (t != null && _player.Distance(t) < _q.Range - 70 && _q.GetPrediction(t).Hitchance >= Qchangeharass())
                      _q.Cast(t, Packets(), true);
              }
              if (useW && _w.IsReady())
              {
                  var t = TargetSelector.GetTarget(_w.Range, TargetSelector.DamageType.Magical);
                  if (t != null && _player.Distance(t) < _w.Range && _w.GetPrediction(t).Hitchance >= Wchangeharass())
                      _w.Cast(t, Packets(), true);
              }
          }
  
          private static void Laneclear()
          {
              if (!Orbwalking.CanMove(40)) return;
  
              var rangedMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range + _q.Width + 30,
                  MinionTypes.Ranged);
              var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range + _q.Width + 30,
                  MinionTypes.All);
              var allMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _w.Range, MinionTypes.All);
              var rangedMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _w.Range + _w.Width + 50,
                  MinionTypes.Ranged);
              var useQl = _config.Item("UseQL").GetValue<bool>();
              var useWl = _config.Item("UseWL").GetValue<bool>();
              if (_q.IsReady() && useQl)
              {
                  var fl2 = _q.GetLineFarmLocation(allMinionsQ, _q.Width);
  
                  if (fl2.MinionsHit >= 3)
                  {
                      _q.Cast(fl2.Position);
                  }
                  else
                      foreach (var minion in allMinionsQ)
                          if (!Orbwalking.InAutoAttackRange(minion) &&
                              minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.Q))
                              _q.Cast(minion);
              }
  
              if (_w.IsReady() && useWl)
              {
                  var fl1 = _w.GetCircularFarmLocation(rangedMinionsW, _w.Width);
  
                  if (fl1.MinionsHit >= 3)
                  {
                      _w.Cast(fl1.Position);
                  }
                  else
                      foreach (var minion in allMinionsW)
                          if (!Orbwalking.InAutoAttackRange(minion) &&
                              minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.W))
                              _w.Cast(minion);
              }
          }
  
          private static void LastHit()
          {
              var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range, MinionTypes.All);
              var useQ = _config.Item("UseQLH").GetValue<bool>();
              var useW = _config.Item("UseWLH").GetValue<bool>();
              if (allMinions.Count < 3) return;
              foreach (var minion in allMinions)
              {
                  if (useQ && _q.IsReady() && minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.Q))
                  {
                      _q.Cast(minion);
                  }
  
                  if (_w.IsReady() && useW && minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.W))
                  {
                      _w.Cast(minion);
                  }
              }
          }
  
          private static void JungleClear()
          {
              var mobs = MinionManager.GetMinions(_player.ServerPosition, _q.Range,
                         MinionTypes.All,
                         MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
              var useQ = _config.Item("UseQJ").GetValue<bool>();
              var useW = _config.Item("UseWJ").GetValue<bool>();
              if (mobs.Count > 0)
              {
  
gt:                 var mob = mobs[0];