Skip to content Personal Open source Business Explore Sign upSign inPricingBlogSupport This repository Search Watch 1 Star 2 Fork 13 detuks/GoodGuyJodu Code Issues 0 Pull requests 0 Pulse Graphs Branch: master Find file Copy pathGoodGuyJodu/DeadMan/Champions/Corki.cs 262dc5c on 21 Sep 2015 @detuks detuks Deadman ;D is in well I hope staff guys wont assasinate me 1 contributor RawBlameHistory 181 lines (156 sloc) 6.68 KB #region using System; using System.Drawing; using System.Linq; using DetuksSharp; using LeagueSharp; using LeagueSharp.Common; #endregion namespace Marksman.Champions { internal class Corki : Champion { public Spell E; public Spell Q; public Spell R1; public Spell R2; public Corki() { Utils.Utils.PrintMessage("Corki loaded"); Q = new Spell(SpellSlot.Q, 825f); E = new Spell(SpellSlot.E, 600f); R1 = new Spell(SpellSlot.R, 1300f); R2 = new Spell(SpellSlot.R, 1500f); Q.SetSkillshot(0.35f, 250f, 1500f, false, SkillshotType.SkillshotCircle); E.SetSkillshot(0f, (float) (45*Math.PI/180), 1500, false, SkillshotType.SkillshotCone); R1.SetSkillshot(0.2f, 40f, 2000f, true, SkillshotType.SkillshotLine); R2.SetSkillshot(0.2f, 40f, 2000f, true, SkillshotType.SkillshotLine); } public override void Drawing_OnDraw(EventArgs args) { Spell[] spellList = {Q, E, R1}; foreach (var spell in spellList) { var menuItem = GetValue("Draw" + spell.Slot); if (menuItem.Active) Render.Circle.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color); } } public override void Game_OnGameUpdate(EventArgs args) { if (R1.IsReady() && GetValue("UseRM")) { var bigRocket = HasBigRocket(); foreach ( var hero in ObjectManager.Get() .Where( hero => hero.IsValidTarget(bigRocket ? R2.Range : R1.Range) && R1.GetDamage(hero)*(bigRocket ? 1.5f : 1f) > hero.Health)) { if (bigRocket) R2.Cast(hero, false, true); else R1.Cast(hero, false, true); } } if ((!ComboActive && !HarassActive) || !DeathWalker.canMove()) return; var useQ = GetValue("UseQ" + (ComboActive ? "C" : "H")); var useE = GetValue("UseE" + (ComboActive ? "C" : "H")); var useR = GetValue("UseR" + (ComboActive ? "C" : "H")); var rLim = GetValue("Rlim" + (ComboActive ? "C" : "H")).Value; if (useQ && Q.IsReady()) { var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical); if (t != null) if (Q.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted) return; } if (useE && E.IsReady()) { var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical); if (t != null) if (E.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted) return; } if (useR && R1.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Ammo > rLim) { var bigRocket = HasBigRocket(); var t = TargetSelector.GetTarget(bigRocket ? R2.Range : R1.Range, TargetSelector.DamageType.Magical); if (t != null) if (bigRocket) R2.Cast(t, false, true); else R1.Cast(t, false, true); } } public override void DeathWalker_AfterAttack(AttackableUnit unit, AttackableUnit target) { var t = target as Obj_AI_Hero; if (t == null || (!ComboActive && !HarassActive) || !unit.IsMe) return; var useQ = GetValue("UseQ" + (ComboActive ? "C" : "H")); var useE = GetValue("UseE" + (ComboActive ? "C" : "H")); var useR = GetValue("UseR" + (ComboActive ? "C" : "H")); var rLim = GetValue("Rlim" + (ComboActive ? "C" : "H")).Value; if (useQ && Q.IsReady()) if (Q.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted) return; if (useE && E.IsReady()) if (E.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted) return; if (useR && R1.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Ammo > rLim) if (HasBigRocket()) R2.Cast(t, false, true); else R1.Cast(t, false, true); } public bool HasBigRocket() { return ObjectManager.Player.Buffs.Any(buff => buff.DisplayName.ToLower() == "corkimissilebarragecounterbig"); } public override bool ComboMenu(Menu config) { config.AddItem(new MenuItem("UseQC" + Id, "Use Q").SetValue(true)); config.AddItem(new MenuItem("UseEC" + Id, "Use E").SetValue(true)); config.AddItem(new MenuItem("UseRC" + Id, "Use R").SetValue(true)); config.AddItem(new MenuItem("RlimC" + Id, "Keep R Stacks").SetValue(new Slider(0, 0, 7))); return true; } public override bool HarassMenu(Menu config) { config.AddItem(new MenuItem("UseQH" + Id, "Use Q").SetValue(true)); config.AddItem(new MenuItem("UseEH" + Id, "Use E").SetValue(false)); config.AddItem(new MenuItem("UseRH" + Id, "Use R").SetValue(true)); config.AddItem(new MenuItem("RlimH" + Id, "Keep R Stacks").SetValue(new Slider(3, 0, 7))); return true; } public override bool DrawingMenu(Menu config) { config.AddItem( new MenuItem("DrawQ" + Id, "Q range").SetValue(new Circle(true, Color.FromArgb(100, 255, 0, 255)))); config.AddItem( new MenuItem("DrawE" + Id, "E range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255)))); config.AddItem( new MenuItem("DrawR" + Id, "R range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255)))); return true; } public override bool MiscMenu(Menu config) { config.AddItem(new MenuItem("UseRM" + Id, "Use R To Killsteal").SetValue(true)); return true; } public override bool ExtrasMenu(Menu config) { return true; } public override bool LaneClearMenu(Menu config) { return true; } } } Status API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Contact Help