private static void OnGameUpdate(EventArgs args) { try { if (Player.IsDead) { return; } //킬스틸 타겟 var KTarget = ObjectManager.Get <Obj_AI_Hero>().OrderByDescending(x => x.Health).FirstOrDefault(x => x.IsEnemy && x.Distance(Player) < 375); if (KTarget != null && MainMenu._MainMenu.Item("KUse_R").GetValue <bool>() && KTarget.Health < _R.GetDamage(KTarget) && _R.IsReady()) { _R.Cast(KTarget, true); } if (InsecTime < Environment.TickCount) { InsecType = "Wait"; // 인섹킥 초기화 } if (Ward_Time < Environment.TickCount) { WW = true; // 와드방호 초기화 } if (MainMenu._MainMenu.Item("AutoKick").GetValue <Slider>().Value != 0 && _R.Level > 0 && _R.IsReady() && !MainMenu._MainMenu.Item("InsecKick").GetValue <KeyBind>().Active) { AutoKick(); // 오토 킥 } if (MainMenu._MainMenu.Item("CKey").GetValue <KeyBind>().Active) // Combo { var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.Physical); var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical); if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && MainMenu._MainMenu.Item("CUse_Q").GetValue <bool>() && QTime < Environment.TickCount) { var HC = HitChance.Medium; switch (MainMenu._MainMenu.Item("CUseQ_Hit").GetValue <Slider>().Value) { case 1: HC = HitChance.OutOfRange; break; case 2: HC = HitChance.Impossible; break; case 3: HC = HitChance.Low; break; case 4: HC = HitChance.Medium; break; case 5: HC = HitChance.High; break; case 6: HC = HitChance.VeryHigh; break; } _Q.CastIfHitchanceEquals(QTarget, HC, true); QTime = TickCount(2000); } if (ETarget != null && _E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && ETime < Environment.TickCount && MainMenu._MainMenu.Item("CUse_E").GetValue <bool>()) { _E.Cast(true); ETime = TickCount(1000); } if (!_Q.IsReady() && !_E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && WTime < Environment.TickCount && MainMenu._MainMenu.Item("CUse_W").GetValue <bool>()) { _W.Cast(Player, true); WTime = TickCount(1000); } } if (MainMenu._MainMenu.Item("HKey").GetValue <KeyBind>().Active) // Hafass { var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.Physical); var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical); if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && MainMenu._MainMenu.Item("HUse_Q").GetValue <bool>() && QTime < Environment.TickCount) { var HC = HitChance.Medium; _Q.CastIfHitchanceEquals(QTarget, HC, true); QTime = TickCount(2000); } if (ETarget != null && _E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && ETime < Environment.TickCount && MainMenu._MainMenu.Item("HUse_E").GetValue <bool>()) { _E.Cast(true); ETime = TickCount(1000); } if (!_Q.IsReady() && !_E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && WTime < Environment.TickCount && MainMenu._MainMenu.Item("HUse_W").GetValue <bool>()) { _W.Cast(Player, true); WTime = TickCount(1000); } } if (MainMenu._MainMenu.Item("LKey").GetValue <KeyBind>().Active) // LaneClear { var MinionTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health); foreach (var minion in MinionTarget) { if (_Q.IsReady() && MainMenu._MainMenu.Item("LUse_Q").GetValue <bool>() && minion != null && Environment.TickCount > QTime) { _Q.CastIfHitchanceEquals(minion, HitChance.Medium, true); QTime = TickCount(1000); } if (_E.IsReady() && MainMenu._MainMenu.Item("LUse_E").GetValue <bool>() && minion != null && Environment.TickCount > ETime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _E.Cast(true); ETime = TickCount(1000); } if (_W.IsReady() && MainMenu._MainMenu.Item("LUse_W").GetValue <bool>() && minion != null && Environment.TickCount > WTime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _W.Cast(Player, true); WTime = TickCount(1000); } } } if (MainMenu._MainMenu.Item("JKey").GetValue <KeyBind>().Active) // JungleClear { var JungleTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); foreach (var minion in JungleTarget) { if (_Q.IsReady() && MainMenu._MainMenu.Item("JUse_Q").GetValue <bool>() && minion != null && Environment.TickCount > QTime) { _Q.CastIfHitchanceEquals(minion, HitChance.Medium, true); QTime = TickCount(1500); } if (_E.IsReady() && MainMenu._MainMenu.Item("JUse_E").GetValue <bool>() && minion != null && Environment.TickCount > ETime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _E.Cast(true); ETime = TickCount(1500); } if (_W.IsReady() && MainMenu._MainMenu.Item("JUse_W").GetValue <bool>() && minion != null && Environment.TickCount > WTime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _W.Cast(Player, true); WTime = TickCount(1500); } } } if (MainMenu._MainMenu.Item("InsecKick").GetValue <KeyBind>().Active) // 인섹킥 { var GetTarget = TargetSelector.GetSelectedTarget(); if (GetTarget == null || GetTarget.IsDead) { return; } var Turrets = ObjectManager.Get <Obj_Turret>() .OrderBy(obj => obj.Position.Distance(Player.Position)) .FirstOrDefault(obj => obj.IsAlly && obj.Health > 1); var AllyChampion = ObjectManager.Get <Obj_AI_Hero>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && !obj.IsDead && obj.Distance(Player.Position) < 2000); if (Turrets == null && AllyChampion == null) { return; } if (AllyChampion != null) { InsecST = AllyChampion.Position; } else { InsecST = Turrets.Position; } InsecED = GetTarget.Position; InsecPOS = InsecST.Extend(InsecED, +InsecED.Distance(InsecST) + 230); Player.IssueOrder(GameObjectOrder.MoveTo, InsecPOS); //Drawing.DrawText(200, 200, Color.White, InsecType); if (MainMenu._MainMenu.Item("KickAndFlash").GetValue <bool>() && InsecPOS.Distance(Player.Position) < 425 && GetTarget.Distance(Player.Position) < 375 && InsecType == "Wait" && _R.Level > 0 && _R.IsReady() && InsecType != "WF" && InsecType != "WF1" && Player.GetSpellSlot("SummonerFlash").IsReady()) { InsecTime = TickCount(2000); InsecText = "Flash"; InsecType = "RF"; _R.Cast(GetTarget, true); return; } if (InsecPOS.Distance(Player.Position) < 575 && _R.Level > 0 && _R.IsReady() && InsecType != "RF") { InsecText = "Ward"; if (InsecType == "Wait" && InsecType != "WF" && InsecType != "WF1" && _W.IsReady()) { if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } InsecTime = TickCount(2000); InsecType = "WF"; var Ward = Items.GetWardSlot(); Player.Spellbook.CastSpell(Ward.SpellSlot, InsecPOS); } if (InsecType == "WF" && _W.IsReady()) { if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } var WardObj = ObjectManager.Get <Obj_AI_Base>() // 커서근처 와드 유무 .OrderBy(obj => obj.Distance(InsecPOS)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(InsecPOS) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null) { InsecType = "WF1"; _W.Cast(WardObj, true); } } if (InsecType == "WF1") { if (GetTarget.Distance(Player.Position) < 375) { _R.Cast(GetTarget, true); } else { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } return; } // 플 425, 와드 575 } if (MainMenu._MainMenu.Item("Ward_W").GetValue <KeyBind>().Active) // 와드 방호 { //와드방호는 WW로 정의 var Cursor = Game.CursorPos; var Ward = Items.GetWardSlot(); Player.IssueOrder(GameObjectOrder.MoveTo, Cursor); if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } if (Player.Distance(Cursor) > 700) { Cursor = Game.CursorPos.Extend(Player.Position, +Player.Distance(Game.CursorPos) - 700); } //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2); //Drawing.DrawText(200, 200, Color.White, "WW is: " + WW.ToString()); if (_W.IsReady()) { var Object = ObjectManager.Get <Obj_AI_Hero>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) < 110); // 커서근처 챔프유무 var Minion = MinionManager.GetMinions(Cursor, 110, MinionTypes.All, MinionTeam.Ally); // 아군 미니언 유무 var WardObj = ObjectManager.Get <Obj_AI_Base>() // 커서근처 와드 유무 .OrderBy(obj => obj.Distance(Cursor)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null) { _W.Cast(WardObj, true); Ward_Time = TickCount(2000); WW = true; return; } if (Object != null) { _W.Cast(Object, true); Ward_Time = TickCount(2000); WW = true; return; } if (Minion != null) { foreach (var minion in Minion) { if (minion != null) { _W.Cast(minion, true); Ward_Time = TickCount(2000); WW = true; return; } } } if (Player.Distance(Cursor) > 575) { Cursor = Game.CursorPos.Extend(Player.Position, +Player.Distance(Game.CursorPos) - 575); } //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2); if (WW && Ward != null && Ward_Time < Environment.TickCount) { Player.Spellbook.CastSpell(Ward.SpellSlot, Cursor); WW = false; Ward_Time = TickCount(2000); } WardObj = ObjectManager.Get <Obj_AI_Base>() // 커서근처 와드 유무 .OrderBy(obj => obj.Distance(Cursor)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null) { _W.Cast(WardObj, true); Ward_Time = TickCount(2000); WW = true; return; } } } } catch (Exception e) { Console.Write(e); Game.PrintChat("FreshLeesin is not working. plz send message by KorFresh (Code 4)"); } }
private static void OnGameUpdate(EventArgs args) { try { if (Player.IsDead) { return; } //킬스틸 타겟 var KTarget = ObjectManager.Get <AIHeroClient>().OrderByDescending(x => x.Health).FirstOrDefault(x => x.IsEnemy && x.LSDistance(Player) < 375); if (KTarget != null && getCheckBoxItem(miscMenu, "LeeSin_KUse_R") && KTarget.Health < _R.GetDamage(KTarget) && _R.IsReady()) { _R.Cast(KTarget, true); } if (InsecTime < Environment.TickCount) { InsecType = "Wait"; // 인섹킥 초기화 } if (Ward_Time < Environment.TickCount) { WW = true; // 와드방호 초기화 } if (getSliderItem(miscMenu, "LeeSin_AutoKick") != 0 && _R.Level > 0 && _R.IsReady() && !getKeyBindItem(miscMenu, "LeeSin_InsecKick")) { AutoKick(); // 오토 킥 } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) // Combo { var QTarget = TargetSelector.GetTarget(_Q.Range, DamageType.Physical); var ETarget = TargetSelector.GetTarget(_E.Range, DamageType.Physical); if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && getCheckBoxItem(comboMenu, "LeeSin_CUse_Q") && QTime < Environment.TickCount) { var HC = EloBuddy.SDK.Enumerations.HitChance.Medium; switch (getSliderItem(comboMenu, "LeeSin_CUseQ_Hit")) { case 1: HC = EloBuddy.SDK.Enumerations.HitChance.Low; break; case 2: HC = EloBuddy.SDK.Enumerations.HitChance.Medium; break; case 3: HC = EloBuddy.SDK.Enumerations.HitChance.High; break; } var prediction = _Q.GetPrediction(QTarget); if (prediction.HitChance >= HC) { _Q.Cast(prediction.CastPosition); } QTime = TickCount(2000); } if (QTarget != null && QTarget.HasBuff("BlindMonkSonicWave") && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name != "BlindMonkQOne" && getCheckBoxItem(comboMenu, "LeeSin_CUse_Q")) { _Q.Cast(); } if (ETarget != null && _E.IsReady() && !Orbwalker.CanAutoAttack && Orbwalker.CanMove && ETime < Environment.TickCount && getCheckBoxItem(comboMenu, "LeeSin_CUse_E")) { _E.Cast(true); ETime = TickCount(1000); } if (!_Q.IsReady() && !_E.IsReady() && !Orbwalker.CanAutoAttack && Orbwalker.CanMove && WTime < Environment.TickCount && getCheckBoxItem(comboMenu, "LeeSin_CUse_W")) { _W.Cast(Player, true); WTime = TickCount(1000); } } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) // Hafass { var QTarget = TargetSelector.GetTarget(_Q.Range, DamageType.Physical); var ETarget = TargetSelector.GetTarget(_E.Range, DamageType.Physical); if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && getCheckBoxItem(harassMenu, "LeeSin_HUse_Q") && QTime < Environment.TickCount) { var HC = EloBuddy.SDK.Enumerations.HitChance.Medium; _Q.CastIfHitchanceEquals(QTarget, HC, true); QTime = TickCount(2000); } if (ETarget != null && _E.IsReady() && !Orbwalker.CanAutoAttack && Orbwalker.CanMove && ETime < Environment.TickCount && getCheckBoxItem(harassMenu, "LeeSin_HUse_E")) { _E.Cast(true); ETime = TickCount(1000); } if (!_Q.IsReady() && !_E.IsReady() && !Orbwalker.CanAutoAttack && Orbwalker.CanMove && WTime < Environment.TickCount && getCheckBoxItem(harassMenu, "LeeSin_HUse_W")) { _W.Cast(Player, true); WTime = TickCount(1000); } } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) // LaneClear { var JungleTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); foreach (var minion in JungleTarget) { if (_Q.IsReady() && getCheckBoxItem(jungleClearMenu, "LeeSin_JUse_Q") && minion != null && Environment.TickCount > QTime) { _Q.CastIfHitchanceEquals(minion, EloBuddy.SDK.Enumerations.HitChance.Medium, true); QTime = TickCount(1500); } if (_E.IsReady() && getCheckBoxItem(jungleClearMenu, "LeeSin_JUse_E") && minion != null && Environment.TickCount > ETime && !Orbwalker.CanAutoAttack && Orbwalker.CanMove) { _E.Cast(true); ETime = TickCount(1500); } if (_W.IsReady() && getCheckBoxItem(jungleClearMenu, "LeeSin_JUse_W") && minion != null && Environment.TickCount > WTime && !Orbwalker.CanAutoAttack && Orbwalker.CanMove) { _W.Cast(Player, true); WTime = TickCount(1500); } } var MinionTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health); foreach (var minion in MinionTarget) { if (_Q.IsReady() && getCheckBoxItem(laneClearMenu, "LeeSin_LUse_Q") && minion != null && Environment.TickCount > QTime) { _Q.CastIfHitchanceEquals(minion, EloBuddy.SDK.Enumerations.HitChance.Medium, true); QTime = TickCount(1000); } if (_E.IsReady() && getCheckBoxItem(laneClearMenu, "LeeSin_LUse_E") && minion != null && Environment.TickCount > ETime && !Orbwalker.CanAutoAttack && Orbwalker.CanMove) { _E.Cast(true); ETime = TickCount(1000); } if (_W.IsReady() && getCheckBoxItem(laneClearMenu, "LeeSin_LUse_W") && minion != null && Environment.TickCount > WTime && !Orbwalker.CanAutoAttack && Orbwalker.CanMove) { _W.Cast(Player, true); WTime = TickCount(1000); } } } if (getKeyBindItem(miscMenu, "LeeSin_InsecKick")) // 인섹킥 { EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); var GetTarget = TargetSelector.SelectedTarget; if (GetTarget == null || GetTarget.IsDead) { return; } if (_Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && _Q.GetPrediction(GetTarget).HitChance >= EloBuddy.SDK.Enumerations.HitChance.Low) { _Q.Cast(GetTarget); } else if (_Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name != "BlindMonkQOne" && GetTarget.HasBuff("BlindMonkSonicWave")) { _Q.Cast(); } var Turrets = ObjectManager.Get <Obj_Turret>() .OrderBy(obj => obj.Position.LSDistance(Player.Position)) .FirstOrDefault(obj => obj.IsAlly && obj.Health > 1); var AllyChampion = ObjectManager.Get <AIHeroClient>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && !obj.IsDead && obj.LSDistance(Player.Position) < 2000); if (Turrets == null && AllyChampion == null) { return; } if (AllyChampion != null) { InsecST = AllyChampion.Position; } else { InsecST = Turrets.Position; } InsecED = GetTarget.Position; InsecPOS = InsecST.LSExtend(InsecED, +InsecED.LSDistance(InsecST) + 230); MovingPlayer(InsecPOS); if (!_R.IsReady()) { return; } if (getCheckBoxItem(miscMenu, "LeeSin_KickAndFlash") && InsecPOS.LSDistance(Player.Position) < 425 && GetTarget.LSDistance(Player.Position) < 375 && InsecType == "Wait" && _R.Level > 0 && _R.IsReady() && InsecType != "WF" && InsecType != "WF1" && Player.GetSpellSlot("SummonerFlash").IsReady()) { InsecTime = TickCount(2000); InsecType = "RF"; _R.Cast(GetTarget, true); return; } if (InsecPOS.LSDistance(Player.Position) < 625 && _R.Level > 0 && _R.IsReady() && InsecType != "RF") { if (InsecType == "Wait" && InsecType != "WF" && InsecType != "WF1" && _W.IsReady()) { if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } InsecTime = TickCount(2000); InsecType = "WF"; var Ward = Items.GetWardSlot(); Player.Spellbook.CastSpell(Ward.SpellSlot, InsecPOS); } if (InsecType == "WF" && _W.IsReady()) { if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } var WardObj = ObjectManager.Get <Obj_AI_Base>() // 커서근처 와드 유무 .OrderBy(obj => obj.LSDistance(InsecPOS)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.LSDistance(InsecPOS) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null) { InsecType = "WF1"; _W.Cast(WardObj, true); } } if (InsecType == "WF1") { if (GetTarget.LSDistance(Player.Position) < 375) { _R.Cast(GetTarget, true); } else { EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } return; } // 플 425, 와드 625 } if (getKeyBindItem(miscMenu, ("LeeSin_Ward_W"))) // 와드 방호 { //와드방호는 WW로 정의 var Cursor = Game.CursorPos; var Ward = Items.GetWardSlot(); EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Cursor); //Console.WriteLine(ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name); if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "blindmonkwtwo") { return; } if (Player.LSDistance(Cursor) > 700) { Cursor = Game.CursorPos.LSExtend(Player.Position, +Player.LSDistance(Game.CursorPos) - 700); } //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2); //Drawing.DrawText(200, 200, Color.White, "WW is: " + WW.ToString()); if (_W.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "blindmonkwone") { var Object = ObjectManager.Get <AIHeroClient>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.LSDistance(Cursor) < 110); // 커서근처 챔프유무 var Minion = MinionManager.GetMinions(Cursor, 110, MinionTypes.All, MinionTeam.Ally); // 아군 미니언 유무 var WardObj = ObjectManager.Get <Obj_AI_Base>() // 커서근처 와드 유무 .OrderBy(obj => obj.LSDistance(Cursor)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.LSDistance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null && WTime < Environment.TickCount) { _W.Cast(WardObj, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } if (Object != null && WTime < Environment.TickCount) { _W.Cast(Object, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } if (Minion != null && WTime < Environment.TickCount) { foreach (var minion in Minion) { if (minion != null) { _W.Cast(minion, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } } } if (Player.LSDistance(Cursor) > 625) { Cursor = Game.CursorPos.LSExtend(Player.Position, +Player.LSDistance(Game.CursorPos) - 625); } //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2); if (WW && Ward != null && Ward_Time < Environment.TickCount) { Player.Spellbook.CastSpell(Ward.SpellSlot, Cursor); WW = false; Ward_Time = TickCount(2000); } WardObj = ObjectManager.Get <Obj_AI_Base>() // 커서근처 와드 유무 .OrderBy(obj => obj.LSDistance(Cursor)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.LSDistance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null && WTime < Environment.TickCount) { _W.Cast(WardObj, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } } } } catch (Exception) { if (NowTime() > ErrorTime) { //Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 06"); ErrorTime = TickCount(10000); } } }
private void OnGameUpdate(EventArgs args) { if (Player.IsDead) { return; } var KTarget = ObjectManager.Get <AIHeroClient>().OrderByDescending(x => x.Health).FirstOrDefault(x => x.IsEnemy && x.Distance(Player) < 375); if (KTarget != null && _MainMenu.Item("LeeSin_KUse_R").GetValue <bool>() && KTarget.Health < _R.GetDamage(KTarget) && _R.IsReady()) { _R.Cast(KTarget, true); } if (InsecTime < Environment.TickCount) { InsecType = "Wait"; // 인섹킥 초기화 } if (Ward_Time < Environment.TickCount) { WW = true; // 와드방호 초기화 } if (_MainMenu.Item("LeeSin_AutoKick").GetValue <Slider>().Value != 0 && _R.Level > 0 && _R.IsReady() && !_MainMenu.Item("LeeSin_InsecKick").GetValue <KeyBind>().Active) { AutoKick(); } if (_MainMenu.Item("CKey").GetValue <KeyBind>().Active) // Combo { Combo(); var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.Physical); var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical); if (ETarget != null && _E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && ETime < Environment.TickCount && _MainMenu.Item("LeeSin_CUse_E").GetValue <bool>()) { _E.Cast(true); ETime = TickCount(1000); } if (!_Q.IsReady() && !_E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && WTime < Environment.TickCount && _MainMenu.Item("LeeSin_CUse_W").GetValue <bool>()) { _W.Cast(Player, true); WTime = TickCount(1000); } } if (_MainMenu.Item("HKey").GetValue <KeyBind>().Active) // Hafass { var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.Physical); var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical); if (QTarget != null && _Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && _MainMenu.Item("LeeSin_HUse_Q").GetValue <bool>()) { var HC = HitChance.Medium; _Q.CastIfHitchanceEquals(QTarget, HC, true); QTime = TickCount(2000); } if (ETarget != null && _E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && ETime < Environment.TickCount && _MainMenu.Item("LeeSin_HUse_E").GetValue <bool>()) { _E.Cast(true); ETime = TickCount(1000); } if (!_Q.IsReady() && !_E.IsReady() && !Orbwalking.CanAttack() && Orbwalking.CanMove(10) && WTime < Environment.TickCount && _MainMenu.Item("LeeSin_HUse_W").GetValue <bool>()) { _W.Cast(Player, true); WTime = TickCount(1000); } } if (_MainMenu.Item("LKey").GetValue <KeyBind>().Active) // LaneClear { var MinionTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health); foreach (var minion in MinionTarget) { if (_Q.IsReady() && _MainMenu.Item("LeeSin_LUse_Q").GetValue <bool>() && minion != null && Environment.TickCount > QTime) { _Q.CastIfHitchanceEquals(minion, HitChance.Medium, true); QTime = TickCount(1000); } if (_E.IsReady() && _MainMenu.Item("LeeSin_LUse_E").GetValue <bool>() && minion != null && Environment.TickCount > ETime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _E.Cast(true); ETime = TickCount(1000); } if (_W.IsReady() && _MainMenu.Item("LeeSin_LUse_W").GetValue <bool>() && minion != null && Environment.TickCount > WTime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _W.Cast(Player, true); WTime = TickCount(1000); } } } if (_MainMenu.Item("JKey").GetValue <KeyBind>().Active) // JungleClear { var JungleTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); foreach (var minion in JungleTarget) { if (_Q.IsReady() && _MainMenu.Item("LeeSin_JUse_Q").GetValue <bool>() && minion != null && Environment.TickCount > QTime) { _Q.CastIfHitchanceEquals(minion, HitChance.Medium, true); QTime = TickCount(1500); } if (_E.IsReady() && _MainMenu.Item("LeeSin_JUse_E").GetValue <bool>() && minion != null && Environment.TickCount > ETime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _E.Cast(true); ETime = TickCount(1500); } if (_W.IsReady() && _MainMenu.Item("LeeSin_JUse_W").GetValue <bool>() && minion != null && Environment.TickCount > WTime && !Orbwalking.CanAttack() && Orbwalking.CanMove(10)) { _W.Cast(Player, true); WTime = TickCount(1500); } } } if (_MainMenu.Item("LeeSin_InsecKick").GetValue <KeyBind>().Active) // 인섹킥 { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosCenter); var GetTarget = TargetSelector.SelectedTarget; if (GetTarget == null || GetTarget.IsDead) { return; } if (_Q.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Name == "BlindMonkQOne" && _Q.GetPrediction(GetTarget).Hitchance >= HitChance.Medium) { _Q.CastOnUnit(GetTarget, true); } var Turrets = ObjectManager.Get <Obj_Turret>() .OrderBy(obj => obj.Position.Distance(Player.Position)) .FirstOrDefault(obj => obj.IsAlly && obj.Health > 1); var AllyChampion = ObjectManager.Get <AIHeroClient>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && !obj.IsDead && obj.Distance(Player.Position) < 2000); if (Turrets == null && AllyChampion == null) { return; } if (AllyChampion != null) { InsecST = AllyChampion.Position; } else { InsecST = Turrets.Position; } InsecED = GetTarget.Position; InsecPOS = InsecST.Extend(InsecED, +InsecED.Distance(InsecST) + 230); MovingPlayer(InsecPOS); if (!_R.IsReady()) { return; } if (_MainMenu.Item("LeeSin_KickAndFlash").GetValue <bool>() && InsecPOS.Distance(Player.Position) < 425 && GetTarget.Distance(Player.Position) < 375 && InsecType == "Wait" && _R.Level > 0 && _R.IsReady() && InsecType != "WF" && InsecType != "WF1" && Player.GetSpellSlot("SummonerFlash").IsReady()) { InsecTime = TickCount(2000); InsecText = "Flash"; InsecType = "RF"; _R.Cast(GetTarget, true); return; } if (InsecPOS.Distance(Player.Position) < 625 && _R.Level > 0 && _R.IsReady() && InsecType != "RF") { InsecText = "Ward"; if (InsecType == "Wait" && InsecType != "WF" && InsecType != "WF1" && _W.IsReady()) { if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } InsecTime = TickCount(2000); InsecType = "WF"; var Ward = Items.GetWardSlot(); Player.Spellbook.CastSpell(Ward.SpellSlot, InsecPOS); } if (InsecType == "WF" && _W.IsReady()) { if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name == "blindmonkwtwo") { return; } var WardObj = ObjectManager.Get <AIBaseClient>() // 커서근처 와드 유무 .OrderBy(obj => obj.Distance(InsecPOS)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(InsecPOS) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null) { InsecType = "WF1"; _W.Cast(WardObj, true); } } if (InsecType == "WF1") { if (GetTarget.Distance(Player.Position) < 375) { _R.Cast(GetTarget, true); } else { EnsoulSharp.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPosCenter); } } return; } // 플 425, 와드 625 } if (_MainMenu.Item("LeeSin_Ward_W").GetValue <KeyBind>().Active) // 와드 방호 { //와드방호는 WW로 정의 var Cursor = Game.CursorPosCenter; var Ward = Items.GetWardSlot(); EnsoulSharp.Player.IssueOrder(GameObjectOrder.MoveTo, Cursor); if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "BlindMonkWTwo") { return; } if (Player.Distance(Cursor) > 700) { Cursor = Game.CursorPosCenter.Extend(Player.Position, +Player.Distance(Game.CursorPosCenter) - 700); } //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2); //Drawing.DrawText(200, 200, Color.White, "WW is: " + WW.ToString()); if (_W.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Name.ToLower() == "BlindMonkWOne") { var Object = ObjectManager.Get <AIHeroClient>().FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) < 110); // 커서근처 챔프유무 var Minion = MinionManager.GetMinions(Cursor, 110, MinionTypes.All, MinionTeam.Ally); // 아군 미니언 유무 var WardObj = ObjectManager.Get <AIBaseClient>() // 커서근처 와드 유무 .OrderBy(obj => obj.Distance(Cursor)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null && WTime < Environment.TickCount) { _W.Cast(WardObj, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } if (Object != null && WTime < Environment.TickCount) { _W.Cast(Object, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } if (Minion != null && WTime < Environment.TickCount) { foreach (var minion in Minion) { if (minion != null) { _W.Cast(minion, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } } } if (Player.Distance(Cursor) > 625) { Cursor = Game.CursorPosCenter.Extend(Player.Position, +Player.Distance(Game.CursorPosCenter) - 625); } //Render.Circle.DrawCircle(Cursor, 50, Color.Black, 2); if (WW && Ward != null && Ward_Time < Environment.TickCount) { Player.Spellbook.CastSpell(Ward.SpellSlot, Cursor); WW = false; Ward_Time = TickCount(2000); } WardObj = ObjectManager.Get <AIBaseClient>() // 커서근처 와드 유무 .OrderBy(obj => obj.Distance(Cursor)) .FirstOrDefault(obj => obj.IsAlly && !obj.IsMe && obj.Distance(Cursor) <= 110 && obj.Name.ToLower().Contains("ward")); if (WardObj != null && WTime < Environment.TickCount) { _W.Cast(WardObj, true); Ward_Time = TickCount(2000); WW = true; WTime = TickCount(2000); return; } } } }