private static void GameObject_OnCreate(GameObject sender, EventArgs args) { //if (sender.Name.ToLower().Contains("katarina")) //{ // Game.PrintChat(sender.Name); //} if (sender is MissileClient && (sender as MissileClient).SpellCaster.IsMe) { var missile = sender as MissileClient; //Game.PrintChat(missile.SData.Name); if (missile.SData.Name.ToLower().Contains("katarinarmis")) { RMis.Add(missile); LastRMis = Environment.TickCount + 168; } if (missile.SData.Name.ToLower().Contains("katarinawdaggerarc")) { WMis.Add(missile); } } if (sender.Name.ToLower().Contains("katarina_base_e_beam.troy")) { MyBeam.Add(sender); } if (sender.Name.ToLower().Contains("katarina_base_w_indicator")) { Daggers.Add(new KatarinaDagger { Dagger = sender, CreationTime = Environment.TickCount }); } }
private static void OnCreate(GameObject sender) { try { if (!sender.Name.Contains("Katarina_")) { return; } switch (sender.Name) { case "Katarina_Base_Q_Dagger_Land_Stone": case "Katarina_Base_Q_Dagger_Land_Water": case "Katarina_Base_Q_Dagger_Land_Grass": case "Katarina_Base_Q_Dagger_Land_Dirt": case "Katarina_Base_W_Indicator_Ally": case "Katarina_Base_E_Beam": case "Katarina_Base_Dagger_Ground_Indicator": Daggers.Add(new MyDaggerManager(sender, sender.Position, Variables.GameTimeTickCount)); break; case "Katarina_Base_Dagger_PickUp_Cas": case "Katarina_Base_Dagger_PickUp_Tar": var firstDagger = Daggers.OrderBy(x => x.Dagger.Position.Distance(sender.Position)) .FirstOrDefault(); Daggers.Remove(firstDagger); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnCreate." + ex); } }
void Start() { inventory = Daggers.instance; inventory.onItemChanhgedCallback += UpdateUI; slots = itemsParent.GetComponentsInChildren <ShopSlot>(); }
private static void OnCreate(GameObject sender) { try { if (!sender.Name.Contains("Katarina_")) { return; } switch (sender.Name) { case "Katarina_Base_Q_Dagger_Land_Stone.troy": case "Katarina_Base_W_indicator_Ally.troy": case "Katarina_Base_E_Beam.troy": case "Katarina_Base_Dagger_Ground_Indicator.troy": Daggers.Add(new MyDaggerManager(sender, sender.ServerPosition, Game.TickCount)); break; case "Katarina_Base_Dagger_PickUp_Cas.troy": case "Katarina_Base_Dagger_PickUp_Tar.troy": Daggers.RemoveAll(x => x.obj.NetworkId == sender.NetworkId); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnCreate." + ex); } }
internal static void Init(GameObject sender, EventArgs args) { if (!sender.Name.Contains("Katarina")) { return; } if (sender.Name.Contains("Katarina_Base_Q_Darrger_Land_Dirt")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } if (sender.Name.Contains("Katarina_Base_W_indicator_Ally")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } if (sender.Name.Contains("Katarina_Base_E_Beam")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } if (sender.Name.Contains("Katarina_Base_Dagger_PickUp_Cas")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } }
private static void OnDestroy(GameObject sender) { try { if (!sender.Name.Contains("Katarina")) { return; } switch (sender.Name) { case "Katarina_Base_Q_Dagger_Land_Stone": case "Katarina_Base_Q_Dagger_Land_Water": case "Katarina_Base_Q_Dagger_Land_Grass": case "Katarina_Base_Q_Dagger_Land_Dirt": case "Katarina_Base_W_Indicator_Ally": case "Katarina_Base_E_Beam": case "Katarina_Base_Dagger_Ground_Indicator": Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnCreate." + ex); } }
internal static void Init() { if (SpellManager.isCastingUlt || !ManaManager.SpellFarm) { return; } var mobs = MinionManager.GetMinions(Me.Position, Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (mob != null && mob.IsValidTarget(Q.Range)) { if (Menu.GetBool("JungleClearQ") && Q.IsReady() && mob.IsValidTarget(Q.Range)) { Q.CastOnUnit(mob, true); } if (Menu.GetBool("JungleClearW") && W.IsReady() && mob.IsValidTarget(W.Range)) { W.Cast(); } if (Menu.GetBool("JungleClearE") && E.IsReady()) { if (Daggers.Any( x => mobs.Any(a => a.Distance(x.Position) <= SpellManager.PassiveRange) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(mob.Position) <= SpellManager.PassiveRange) .OrderByDescending(x => x.Position.Distance(mob.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { E.Cast(obj.Position, true); } } } else if (mob.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(mob.Position, mob.DistanceToPlayer() + 130); E.Cast(pos, true); } else if (mob.IsValidTarget(E.Range)) { E.Cast(mob, true); } } } } }
public static List <GameObject> GetEVinasun() { List <GameObject> Vinasun = new List <GameObject>(); Vinasun.AddRange(MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.All).Where(x => !((x is Obj_AI_Minion) && MinionManager.IsWard(x as Obj_AI_Minion)))); Vinasun.AddRange(HeroManager.AllHeroes.Where(unit => unit != null && unit.IsValid && !unit.IsDead && unit.IsTargetable && Player.Distance(unit) <= E.Range)); Vinasun.AddRange(Daggers.Select(x => x.Dagger).ToList()); return(Vinasun); }
public void Awake() { if (instance != null) { Debug.LogWarning("More than one instance of Inventory found!"); return; } instance = this; }
private static void OnRender() { try { if (Me.IsDead || MenuGUI.IsChatOpen() || MenuGUI.IsShopOpen()) { return; } if (DrawMenu["FlowersKatarina.DrawMenu.Dagger"].Enabled) { foreach (var position in Daggers.Where(x => !x.obj.IsDead && x.obj.IsValid).Select(x => x.pos)) { if (position != Vector3.Zero) { Render.Circle(position, PassiveRange, 30, Color.FromArgb(69, 0, 255)); } } } if (DrawMenu["FlowersKatarina.DrawMenu.Q"].Enabled && Q.Ready) { Render.Circle(Me.Position, Q.Range, 23, Color.FromArgb(251, 0, 133)); } if (DrawMenu["FlowersKatarina.DrawMenu.E"].Enabled && E.Ready) { Render.Circle(Me.Position, E.Range, 23, Color.FromArgb(0, 136, 255)); } if (DrawMenu["FlowersKatarina.DrawMenu.R"].Enabled && R.Ready) { Render.Circle(Me.Position, R.Range, 23, Color.FromArgb(0, 255, 161)); } Vector2 MePos = Vector2.Zero; Render.WorldToScreen(ObjectManager.GetLocalPlayer().ServerPosition, out MePos); if (DrawMenu["FlowersKatarina.DrawMenu.ComboE"].Enabled) { Render.Text(MePos.X - 57, MePos.Y + 68, Color.Orange, "Only E KillAble(" + ComboMenu["FlowersKatarina.ComboMenu.EKillAble"].As <MenuKeyBind>().Key + "): " + (ComboMenu["FlowersKatarina.ComboMenu.EKillAble"].As <MenuKeyBind>().Enabled ? "On" : "Off")); } if (DrawMenu["FlowersKatarina.DrawMenu.ComboMode"].Enabled) { Render.Text(MePos.X - 57, MePos.Y + 88, Color.Orange, "Combo Mode(" + ComboMenu["FlowersKatarina.ComboMenu.SwitchMode"].As <MenuKeyBind>().Key + "): " + ComboMenu["FlowersKatarina.ComboMenu.Mode"].As <MenuList>().SelectedItem); } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnRender." + ex); } }
public static bool IsWeapon(string itemBase) { if (Bows.Contains(itemBase)) { return(true); } if (Claws.Contains(itemBase)) { return(true); } if (OneHandedAxes.Contains(itemBase)) { return(true); } if (OneHandedMaces.Contains(itemBase)) { return(true); } if (OneHandedSwords.Contains(itemBase)) { return(true); } if (TwoHandedAxes.Contains(itemBase)) { return(true); } if (TwoHandedMaces.Contains(itemBase)) { return(true); } if (TwoHandedSwords.Contains(itemBase)) { return(true); } if (Sceptres.Contains(itemBase)) { return(true); } if (Daggers.Contains(itemBase)) { return(true); } if (Staves.Contains(itemBase)) { return(true); } if (Wands.Contains(itemBase)) { return(true); } return(false); }
internal static Vector3 GetEPosition(AIHeroClient target) { if (Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= PassiveRange) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= PassiveRange) .OrderByDescending(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { return(obj.Position); } } } else if ( Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= E.Range) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= E.Range) .OrderBy(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { return(obj.Position); } } } else if (target.DistanceToPlayer() <= E.Range - 130) { return(Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130)); } else if (target.IsValidTarget(E.Range)) { return(target.Position); } else { return(Vector3.Zero); } return(Vector3.Zero); }
internal static void Init(GameObject sender, EventArgs Args) { if (!sender.Name.Contains("Katarina")) { return; } //Katarina_Base_Q_Darrger_Land_Dirt.troy //Katarina_Base_W_indicator_Ally.troy //Katarina_Base_E_Beam.troy //Katarina_Base_Dagger_PickUp_Cas.troy if (sender.Name.Contains("Katarina_Base_Q_Darrger_Land_Dirt")) { Daggers.Add(new Spells.DaggerManager { Dagger = sender, Position = sender.Position }); } if (sender.Name.Contains("Katarina_Base_W_indicator_Ally")) { Daggers.Add(new Spells.DaggerManager { Dagger = sender, Position = sender.Position }); } if (sender.Name.Contains("Katarina_Base_E_Beam")) { Daggers.Add(new Spells.DaggerManager { Dagger = sender, Position = sender.Position }); } if (sender.Name.Contains("Katarina_Base_Dagger_PickUp_Cas")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } }
private static void OnRender() { try { if (Me.IsDead || MenuGUI.IsChatOpen || MenuGUI.IsShopOpen) { return; } if (DrawMenu["FlowersKatarina.DrawMenu.Dagger"].GetValue <MenuBool>().Enabled) { foreach (var position in Daggers.Where(x => !x.Dagger.IsDead && x.Dagger.IsValid).Select(x => x.Position)) { if (position != Vector3.Zero) { Render.Circle.DrawCircle(position, PassiveRange, Color.FromArgb(69, 0, 255), 1); } } } if (DrawMenu["FlowersKatarina.DrawMenu.Q"].GetValue <MenuBool>().Enabled&& Q.IsReady()) { Render.Circle.DrawCircle(Me.Position, Q.Range, Color.FromArgb(251, 0, 133), 1); } if (DrawMenu["FlowersKatarina.DrawMenu.E"].GetValue <MenuBool>().Enabled&& E.IsReady()) { Render.Circle.DrawCircle(Me.Position, E.Range, Color.FromArgb(0, 136, 255), 1); } if (DrawMenu["FlowersKatarina.DrawMenu.R"].GetValue <MenuBool>().Enabled&& R.IsReady()) { Render.Circle.DrawCircle(Me.Position, R.Range, Color.FromArgb(0, 255, 161), 1); } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnRender." + ex); } }
private static void GameObject_OnDelete(GameObject sender, EventArgs args) { if (sender is MissileClient && (sender as MissileClient).SpellCaster.IsMe) { var missile = sender as MissileClient; if (missile.SData.Name.ToLower().Contains("katarinarmis")) { RMis.RemoveAll(x => x.NetworkId == missile.NetworkId); } if (missile.SData.Name.ToLower().Contains("katarinawdaggerarc")) { WMis.RemoveAll(x => x.NetworkId == missile.NetworkId); } } if (sender.Name.ToLower().Contains("katarina_base_e_beam.troy")) { MyBeam.RemoveAll(x => x.NetworkId == sender.NetworkId); } if (sender.Name.ToLower().Contains("katarina_base_w_indicator")) { Daggers.RemoveAll(x => x.Dagger.NetworkId == sender.NetworkId); } }
private static void OnDestroy(GameObject sender) { try { if (!sender.Name.Contains("Katarina")) { return; } switch (sender.Name) { case "Katarina_Base_Dagger_Ground_Indicator.troy": case "Katarina_Base_Dagger_PickUp_Cas.troy": case "Katarina_Base_Q_Dagger_Land_Stone.troy": case "Katarina_Base_Dagger_PickUp_Tar.troy": Daggers.RemoveAll(x => x.obj.NetworkId == sender.NetworkId); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnCreate." + ex); } }
internal static void Init() { if (SpellManager.isCastingUlt && !Menu.GetBool("KillStealCancel")) { return; } foreach ( var target in HeroManager.Enemies.Where(x => !x.IsDead && !x.IsZombie && x.IsValidTarget(E.Range + 300)) .OrderBy(x => x.Health)) { if (target.Check(E.Range + 300)) { if (target.Health < DamageCalculate.GetQDamage(target) && Menu.GetBool("KillStealQ") && Q.IsReady() && target.IsValidTarget(Q.Range)) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); Q.CastOnUnit(target, true); return; } Q.CastOnUnit(target, true); return; } if (target.Health < DamageCalculate.GetEDamage(target) && Menu.GetBool("KillStealE") && E.IsReady()) { if (target.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130); if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); E.Cast(pos, true); return; } E.Cast(pos, true); return; } if (target.IsValidTarget(E.Range)) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); E.Cast(target, true); return; } E.Cast(target, true); return; } } if (target.Health < DamageCalculate.GetQDamage(target) + DamageCalculate.GetEDamage(target) && Menu.GetBool("KillStealQ") && Menu.GetBool("KillStealE") && Q.IsReady() && E.IsReady() && target.IsValidTarget(E.Range)) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); Q.CastOnUnit(target, true); E.Cast(target, true); return; } Q.CastOnUnit(target, true); E.Cast(target, true); return; } if (target.Health < DamageCalculate.GetPassiveDamage(target) + DamageCalculate.GetEDamage(target) && Menu.GetBool("KillStealE") && E.IsReady() && Daggers.Any( x => x.Dagger.IsValid && x.Position.Distance(target.Position) <= SpellManager.PassiveRange && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= SpellManager.PassiveRange) .OrderBy(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { if (SpellManager.isCastingUlt) { SpellManager.CancelUlt(true); E.Cast(obj.Position, true); LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () => E.Cast(target, true)); return; } E.Cast(obj.Position, true); LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () => E.Cast(target, true)); return; } } } } } }
private static void JungleClearEvent() { try { if (isCastingUlt) { return; } var mobs = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMob()).ToArray(); if (mobs.Any()) { var mob = mobs.FirstOrDefault(); if (mob != null && mob.IsValidTarget(Q.Range)) { if (ClearMenu["FlowersKatarina.ClearMenu.JungleClearQ"].Enabled && Q.Ready && mob.IsValidTarget(Q.Range)) { Q.CastOnUnit(mob); } if (ClearMenu["FlowersKatarina.ClearMenu.JungleClearW"].Enabled && W.Ready && mob.IsValidTarget(W.Range)) { W.Cast(); } if (ClearMenu["FlowersKatarina.ClearMenu.JungleClearE"].Enabled && E.Ready) { if (Daggers.Any( x => mobs.Any(a => a.Distance(x.pos) <= PassiveRange) && x.pos.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.pos.Distance(mob.Position) <= PassiveRange) .OrderByDescending(x => x.pos.Distance(mob.Position))) { if (obj.obj != null && obj.obj.IsValid && obj.pos.DistanceToPlayer() <= E.Range) { E.Cast(obj.pos); } } } else if (mob.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(mob.Position, mob.DistanceToPlayer() + 130); E.Cast(pos); } else if (mob.IsValidTarget(E.Range)) { E.Cast(mob); } } } } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.JungleClearEvent." + ex); } }
private static void OnUpdate() { try { Daggers.RemoveAll(x => Game.TickCount - x.time > 3850); if (Me.IsDead || Me.IsRecalling()) { return; } if (FleeMenu["FlowersKatarina.FleeMenu.Key"].As <MenuKeyBind>().Enabled) { FleeEvent(); } if (MiscMenu["FlowersKatarina.MiscMenu.OneKeyEW"].As <MenuKeyBind>().Enabled&& E.Ready && W.Ready) { SemiEW(); } KillStealEvent(); if (isCastingUlt) { Orbwalker.AttackingEnabled = false; Orbwalker.MovingEnabled = false; if (MiscMenu["FlowersKatarina.MiscMenu.AutoCancelR"].Enabled) { MyExtraManager.CancelUlt(); } return; } Orbwalker.AttackingEnabled = true; Orbwalker.MovingEnabled = true; switch (Orbwalker.Mode) { case OrbwalkingMode.Combo: ComboEvent(); break; case OrbwalkingMode.Mixed: HarassEvent(); break; case OrbwalkingMode.Laneclear: ClearEvent(); break; case OrbwalkingMode.Lasthit: LastHitEvent(); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnUpdate." + ex); } }
private static void KillStealEvent() { try { if (isCastingUlt && !KillStealMenu["FlowersKatarina.KillStealMenu.CancelR"].Enabled) { return; } if (Me.CountEnemyHeroesInRange(E.Range) == 0) { return; } foreach ( var target in GameObjects.EnemyHeroes.Where(x => !x.IsDead && x.IsValidTarget(E.Range + 300)) .OrderBy(x => x.Health)) { if (target.IsValidTarget(E.Range + 300)) { if (KillStealMenu["FlowersKatarina.KillStealMenu.Q"].Enabled && target.Health < Q.GetDamage(target) && Q.Ready && target.IsValidTarget(Q.Range)) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); Q.CastOnUnit(target); return; } Q.CastOnUnit(target); return; } if (KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && target.Health < E.GetDamage(target) && E.Ready) { if (target.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130); if (isCastingUlt) { MyExtraManager.CancelUlt(true); E.Cast(pos); return; } E.Cast(pos); return; } if (target.IsValidTarget(E.Range)) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); E.Cast(target); return; } E.Cast(target); return; } } if (KillStealMenu["FlowersKatarina.KillStealMenu.Q"].Enabled && target.Health < Q.GetDamage(target) + E.GetDamage(target) && KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && Q.Ready && E.Ready && target.IsValidTarget(E.Range)) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); Q.CastOnUnit(target); E.Cast(target); return; } Q.CastOnUnit(target); E.Cast(target); return; } if (target.Health < MyExtraManager.GetKataPassiveDamage(target) + E.GetDamage(target) && KillStealMenu["FlowersKatarina.KillStealMenu.E"].Enabled && E.Ready && Daggers.Any( x => x.obj.IsValid && x.pos.Distance(target.Position) <= PassiveRange && x.pos.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.pos.Distance(target.Position) <= PassiveRange) .OrderBy(x => x.pos.Distance(target.Position))) { if (obj.obj != null && obj.obj.IsValid && obj.pos.DistanceToPlayer() <= E.Range) { if (isCastingUlt) { MyExtraManager.CancelUlt(true); E.Cast(obj.pos); MyDelayAction.Queue(100 + Game.Ping, () => E.Cast(target)); return; } E.Cast(obj.pos); MyDelayAction.Queue(100 + Game.Ping, () => E.Cast(target)); return; } } } if (target.Health < R.GetDamage(target) * 0.6 && KillStealMenu["FlowersKatarina.KillStealMenu.R"].Enabled && R.Ready && target.IsValidTarget(R.Range) && target.Health > 50 * target.Level) { R.Cast(); return; } } } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.KillStealEvent." + ex); } }
public static string GetItemType(string itemBase) { if (Bows.Contains(itemBase)) { return("Bow"); } if (Claws.Contains(itemBase)) { return("Claw"); } if (OneHandedAxes.Contains(itemBase)) { return("One Hand Axe"); } if (OneHandedMaces.Contains(itemBase)) { return("One Hand Mace"); } if (OneHandedSwords.Contains(itemBase)) { return("One Hand Sword"); } if (TwoHandedAxes.Contains(itemBase)) { return("Two Hand Axe"); } if (TwoHandedMaces.Contains(itemBase)) { return("Two Hand Mace"); } if (Sceptres.Contains(itemBase)) { return("Sceptre"); } if (Daggers.Contains(itemBase)) { return("Dagger"); } if (Staves.Contains(itemBase)) { return("Staff"); } if (Belts.Contains(itemBase)) { return("Belt"); } if (Amulets.Contains(itemBase)) { return("Amulet"); } if (Rings.Contains(itemBase)) { return("Ring"); } if (Boots.Contains(itemBase)) { return("Boots"); } if (Gloves.Contains(itemBase)) { return("Gloves"); } if (BodyArmors.Contains(itemBase)) { return("Body Armour"); } if (Wands.Contains(itemBase)) { return("Wand"); } if (Helmets.Contains(itemBase)) { return("Helmet"); } if (Shields.Contains(itemBase)) { return("Shield"); } if (Jewels.Contains(itemBase)) { return("Jewel"); } if (itemBase == "Gem") { return(itemBase); } if (Quivers.Contains(itemBase)) { return("Quiver"); } return("No type found"); }
static void PlayerChooseLoadout() { Render code = new Render(); Program code1 = new Program(); code.RenderPlayerChoosing(1); string info2 = Console.ReadLine(); int playerInput; try { playerInput = Int32.Parse(info2); } catch { Console.WriteLine("Creation Error... Shutting...Down...."); PlayerChooseLoadout(); return; } switch (playerInput) { case 1: player1.classType = "Warrior"; Console.WriteLine("Warrior it is..."); break; case 2: player1.classType = "Mage"; Console.WriteLine("Mage it is..."); break; case 3: player1.classType = "Rogue"; Console.WriteLine("Rogue it is..."); break; default: Console.WriteLine("Creation Error... Shutting...Down...."); PlayerChooseLoadout(); return; } code.RenderPlayerChoosing(2); string info = Console.ReadLine(); try { playerInput = Int32.Parse(info); } catch { Console.WriteLine("Creation Error... Shutting...Down...."); PlayerChooseLoadout(); return; } int weaponLevel = GetRandom(1, 5); ItemFactory code3 = new ItemFactory(); switch (playerInput) { case 1: Broadsword PlayerWeapon = new Broadsword("", weaponLevel); player1.EntityWeapon = PlayerWeapon; Console.WriteLine("Broadsword it is..."); break; case 2: Mace PlayerWeapon2 = new Mace("", weaponLevel); player1.EntityWeapon = PlayerWeapon2; Console.WriteLine("Mace it is..."); break; case 3: Daggers PlayerWeapon3 = new Daggers("", weaponLevel); player1.EntityWeapon = PlayerWeapon3; Console.WriteLine("Twin Daggers it is..."); break; case 4: Axe PlayerWeapon4 = new Axe("", weaponLevel); player1.EntityWeapon = PlayerWeapon4; Console.WriteLine("War Axe it is..."); break; case 5: Weapon PlayerWeapon5 = code3.CreateRandomWeapon(weaponLevel); player1.EntityWeapon = PlayerWeapon5; Console.WriteLine(player1.EntityWeapon.name + " it is..."); break; default: Console.WriteLine("Creation Error... Shutting...Down...."); PlayerChooseLoadout(); return; } code.RenderPlayerChoosing(3); string info1 = Console.ReadLine(); try { playerInput = Int32.Parse(info1); } catch { Console.WriteLine("Creation Error... Restarting..."); PlayerChooseLoadout(); return; } int armorLevel = GetRandom(1, 5); switch (playerInput) { case 1: Chainmail PlayerArmor = new Chainmail("", armorLevel); player1.EntityArmor = PlayerArmor; Console.WriteLine("Chainmail it is..."); break; case 2: Leather PlayerArmor2 = new Leather("", armorLevel); player1.EntityArmor = PlayerArmor2; Console.WriteLine("Thick Leather it is..."); break; case 3: Cloth PlayerArmor3 = new Cloth("", armorLevel); player1.EntityArmor = PlayerArmor3; Console.WriteLine("Sleek Silken Thinking Cloth... is that even armor?"); break; case 4: Plate PlayerArmor4 = new Plate("", armorLevel); player1.EntityArmor = PlayerArmor4; Console.WriteLine("Plate it is..."); break; case 5: Armor PlayerArmor5 = code3.CreateRandomArmor(armorLevel); player1.EntityArmor = PlayerArmor5; Console.WriteLine(player1.EntityArmor.name + " it is..."); break; default: Console.WriteLine("Creation Error... Restarting..."); PlayerChooseLoadout(); return; } code.RenderPlayerChoosing(4); string info3 = Console.ReadLine(); try { playerInput = Int32.Parse(info3); } catch { Console.WriteLine("Creation Error... Restarting..."); PlayerChooseLoadout(); return; } int potionLevel = GetRandom(1, 5); switch (playerInput) { case 1: Health_Potion playerPotion = new Health_Potion("Health_Potion", potionLevel); player1.entityPotions.Add(playerPotion); Console.WriteLine("Health Potion it is..."); break; case 2: Fire_Potion playerPotion1 = new Fire_Potion("Fire_Potion", potionLevel); player1.entityPotions.Add(playerPotion1); Console.WriteLine("Fire Potion it is..."); break; default: Console.WriteLine("Creation Error... Restarting..."); PlayerChooseLoadout(); return; } while (player1.entityPotions.Count < 4) { Potion empty = new Potion("Empty_Potion", player1.entityPotions.Count + 1); player1.entityPotions.Add(empty); } ColorWriter(ConsoleColor.Gray, "ready yourself, Gladiator...\n"); Thread.Sleep(1000); int howManyMonsters = GetRandom(1, 5); MonsterIntro(player1, howManyMonsters); }
internal static void EQWLogic(bool useQ, bool useW, bool useE) { var target = TargetSelector.GetTarget(E.Range + 300f, TargetSelector.DamageType.Magical); if (target.Check(E.Range + 300f)) { if (useE && E.IsReady() && target.IsValidTarget(E.Range + 300f)) { if (Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= PassiveRange) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= PassiveRange) .OrderByDescending(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { E.Cast(obj.Position, true); } } } else if ( Daggers.Any( x => HeroManager.Enemies.Any(a => a.Distance(x.Position) <= E.Range) && x.Position.DistanceToPlayer() <= E.Range)) { foreach ( var obj in Daggers.Where(x => x.Position.Distance(target.Position) <= E.Range) .OrderBy(x => x.Position.Distance(target.Position))) { if (obj.Dagger != null && obj.Dagger.IsValid && obj.Position.DistanceToPlayer() <= E.Range) { E.Cast(obj.Position, true); } } } else if (target.DistanceToPlayer() <= E.Range + 130) { var pos = Me.Position.Extend(target.Position, target.DistanceToPlayer() + 130); E.Cast(pos, true); } else if (target.IsValidTarget(E.Range)) { E.Cast(target, true); } } if (useQ && Q.IsReady() && target.IsValidTarget(Q.Range) && !E.IsReady()) { Q.CastOnUnit(target, true); } if (useW && W.IsReady() && target.IsValidTarget(W.Range)) { W.Cast(); } } }
private static void DoCombo() { var target = TargetSelector.GetTarget(e.Range); var UseQ = Menu["Combo"].GetValue <MenuBool>("comboQ"); var UseW = Menu["Combo"].GetValue <MenuBool>("comboW"); var UseE = Menu["Combo"].GetValue <MenuBool>("comboE"); var UseETurret = Menu["Combo"].GetValue <MenuBool>("eTurret"); var SaveE = Menu["Combo"].GetValue <MenuBool>("eDagger"); var noR = Menu["Combo"].GetValue <MenuBool>("noR"); var eMode = Menu["Combo"].GetValue <MenuList>("comboEMode"); var rMode = Menu["Combo"].GetValue <MenuList>("comboRMode"); var minRHealth = Menu["Combo"].GetValue <MenuSlider>("MinRHealth"); if (!target.IsValidTarget()) { return; } if (Player.HasBuff("katarinarsound")) { if (noR) { if (Player.CountEnemyHeroesInRange(r.Range) == 0) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } } if (target != null && UseQ && UseE && Player.GetSpellDamage(target, SpellSlot.Q) + Player.GetSpellDamage(target, SpellSlot.E) >= target.Health) { foreach (var daggers in GameObjects.AllGameObjects) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid && e.IsReady()) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range) && e.IsReady()) { e.Cast(daggers.Position.Extend(target.Position, 200)); } if (daggers.Distance(Player) > e.Range) { e.Cast(target.Position.Extend(Player.Position, -50)); } if (daggers.Distance(target) > 450) { e.Cast(target.Position.Extend(Player.Position, -50)); } } if (!Daggers.Any() && e.IsReady()) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); e.Cast(target.Position.Extend(Player.Position, -50)); } if (target.IsValidTarget(q.Range) && q.IsReady()) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); q.CastOnUnit(target); } } } } switch (Menu["Combo"].GetValue <MenuList>("comboMode").Index) { case 0: if (q.IsReady() && UseQ && target.IsValidTarget(q.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } q.CastOnUnit(target); } } if (e.IsReady() && UseE && target.IsValidTarget(e.Range) && !q.IsReady()) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } if (UseETurret && target.IsUnderEnemyTurret()) { return; } foreach (var daggers in GameObjects.AllGameObjects) { if (!SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(Player) > e.Range) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(target) > 450) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (!Daggers.Any()) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } } } } } if (w.IsReady() && UseW && target.IsValidTarget(w.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } w.Cast(); } } if (r.IsReady() && rMode.Index != 2) { if (rMode.Index == 0) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.HealthPercent <= minRHealth.Value) { r.Cast(); } } } if (rMode.Index == 1) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.Health <= Player.GetSpellDamage(target, SpellSlot.Q) + Player.GetSpellDamage(target, SpellSlot.E) + Daggersdmg(target) + Rdmg(target) * 10) { if (!q.IsReady()) { r.Cast(); } } } } } break; case 1: if (e.IsReady() && UseE && target.IsValidTarget(e.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } if (UseETurret && target.IsUnderEnemyTurret()) { return; } foreach (var daggers in GameObjects.AllGameObjects) { if (!SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(Player) > e.Range) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } if (daggers.Distance(target) > 450) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (!Daggers.Any()) { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } if (SaveE) { if (daggers.Name == "HiddenMinion" && !daggers.IsDead && daggers.IsValid) { if (target.Distance(daggers) < 450 && target.IsValidTarget(e.Range)) { e.Cast(daggers.Position.Extend(target.Position, 200)); } else { if (eMode.Index == 0) { e.Cast(target.Position.Extend(Player.Position, -50)); } else if (eMode.Index == 1) { e.Cast(target.Position.Extend(Player.Position, 50)); } } } } } } } if (w.IsReady() && UseW && target.IsValidTarget(w.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } w.Cast(); } } if (q.IsReady() && UseQ && target.IsValidTarget(q.Range)) { if (target != null) { if (Player.HasBuff("katarinarsound")) { return; } q.CastOnUnit(target); } } if (r.IsReady() && rMode.Index != 2) { if (rMode.Index == 0) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.HealthPercent <= minRHealth.GetValue <MenuSlider>().Value) { r.Cast(); } } } if (rMode.Index == 1) { if (target.IsValidTarget(r.Range - 150)) { if (target != null && target.Health <= Player.GetSpellDamage(target, SpellSlot.Q) + Player.GetSpellDamage(target, SpellSlot.E) + Daggersdmg(target) + Rdmg(target) * 10) { if (!q.IsReady()) { r.Cast(); } } } } } break; } }
private static void Game_OnUpdate(EventArgs args) { // blocking AA if (ComboDontAttack.GetValue <bool>() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) { if (Daggers.Any(x => x.Dagger.Position.Distance(Player.Position) <= 150 + ComboDontAttackRange.GetValue <Slider>().Value) && !Daggers.Any(x => x.Dagger.Position.Distance(Player.Position) <= 150)) { Orbwalking.Attack = false; } else { Orbwalking.Attack = true; } } else { Orbwalking.Attack = true; } if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo) { return; } // cancel R if (ComboCancelRNoTarget.GetValue <bool>() && Player.IsChannelingImportantSpell() && Player.CountEnemiesInRange(R.Range) == 0 && Environment.TickCount >= LastRMis) { Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); } // ks if (ComboCancelRForKS.GetValue <bool>() || !Player.IsChannelingImportantSpell()) { var targetQ = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (targetQ.IsValidTarget() && Q.IsReady() && GetQDamage(targetQ) >= targetQ.Health) { Q.Cast(targetQ); } var targetE = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (targetE.IsValidTarget() && E.IsReady() && GetEDamage(targetE) >= targetE.Health) { E.Cast(targetE); } var targetEQ = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (targetEQ.IsValidTarget() && E.IsReady() && Q.IsReady() && GetEDamage(targetEQ) + GetQDamage(targetEQ) >= targetEQ.Health) { E.Cast(targetEQ); } if (Q.IsReady() && E.IsReady()) { foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(E.Range + Q.Range + 150) && GetQDamage(x) >= x.Health)) { var nearest = GetEVinasun().MinOrDefault(x => x.Position.Distance(hero.Position)); if (nearest != null && nearest.Position.Distance(hero.Position) <= 150 + Q.Range) { var pos = nearest.Position.To2D().Extend(hero.Position.To2D(), 150); E.Cast(pos); } } } } // normal if (Player.IsChannelingImportantSpell()) { return; } //hextechgunblade if (ItemData.Hextech_Gunblade.GetItem().IsReady()) { var target = TargetSelector.GetTarget(700, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { ItemData.Hextech_Gunblade.GetItem().Cast(target); } } //cutlass if (ItemData.Bilgewater_Cutlass.GetItem().IsReady()) { var target = TargetSelector.GetTarget(550, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { ItemData.Bilgewater_Cutlass.GetItem().Cast(target); } } // W if (W.IsReady() && !E.IsReady()) { var target = TargetSelector.GetTarget(300, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { W.Cast(); } } // Q if (Q.IsReady()) { if (!(W.IsReady() && E.IsReady())) { var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { Q.Cast(target); } } } //E if (E.IsReady()) { var EdaggerTarget = TargetSelector.GetTarget(E.Range + 200, TargetSelector.DamageType.Magical); var ETarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); var EdaggerOthers = HeroManager.Enemies.Where(x => x.IsValidTarget(E.Range + 200) && IsDaggerFixed(x)); if (EdaggerTarget != null && IsDaggerFixed(EdaggerTarget)) { var EdaggerTargetdagger = GetFixedDagger(EdaggerTarget); if (EdaggerTargetdagger.Dagger != null) { CastEFixedDagger(EdaggerTargetdagger, EdaggerTarget); } } else if (EdaggerOthers.Any()) { var target = EdaggerOthers.MinOrDefault(x => x.Health); var targetdagger = GetFixedDagger(target); if (targetdagger.Dagger != null) { CastEFixedDagger(targetdagger, target); } } else if (ETarget != null && !(Q.IsReady() && !W.IsReady())) { var pos = Player.Position.To2D().Extend(ETarget.Position.To2D(), Player.Distance(ETarget) + 150); E.Cast(pos); } // gapclose else if (Q.IsReady() || W.IsReady() || R.IsReady()) { var Vinasun = PickableDaggers.Where(x => x.Dagger.Position.CountEnemiesInRange(E.Range) > 0).MaxOrDefault(x => x.Dagger.Position.CountEnemiesInRange(E.Range)); if (Vinasun != null) { E.Cast(Vinasun.Dagger.Position); } } } // R if (R.Level >= 1 && R.Instance.CooldownExpires <= Game.Time) { //Game.PrintChat("1"); { var expires = (E.Instance.CooldownExpires - Game.Time) * 1000; if (E.IsReady() || expires < 50) { //Game.PrintChat("2"); var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { E.Cast(target.Position); } } else if (R.IsReady()) { //Game.PrintChat("3"); var target = TargetSelector.GetTarget(R.Range - 200, TargetSelector.DamageType.Magical); if (target.IsValidTarget()) { if (W.IsReady()) { W.Cast(); } else if (Q.IsReady()) { Q.Cast(target); } else { R.Cast(); } } } } } }
private static void OnUpdate() { try { Daggers.RemoveAll(x => Variables.GameTimeTickCount - x.CreateTime > 3850); if (Me.IsDead || Me.IsRecalling()) { return; } if (FleeMenu["FlowersKatarina.FleeMenu.Key"].GetValue <MenuKeyBind>().Active) { FleeEvent(); } if (MiscMenu["FlowersKatarina.MiscMenu.OneKeyEW"].GetValue <MenuKeyBind>().Active&& E.IsReady() && W.IsReady()) { SemiEW(); } KillStealEvent(); if (isCastingUlt) { Chat.Print("IS CASTING R"); Orbwalker.AttackState = false; Orbwalker.MovementState = false; if (MiscMenu["FlowersKatarina.MiscMenu.AutoCancelR"].GetValue <MenuBool>().Enabled) { MyExtraManager.CancelUlt(); } return; } Orbwalker.AttackState = true; Orbwalker.MovementState = true; switch (Orbwalker.ActiveMode) { case OrbwalkerMode.Combo: ComboEvent(); break; case OrbwalkerMode.Harass: HarassEvent(); break; case OrbwalkerMode.LaneClear: ClearEvent(); break; case OrbwalkerMode.LastHit: LastHitEvent(); break; } } catch (Exception ex) { Console.WriteLine("Error in MyEventManager.OnUpdate." + ex); } }