private static void OnBuffGain(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if(sender.IsMe && args.Buff.Name == "katarinarsound") { whenToCancelR = Utils.TickCount + 400; } }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (args.Buff.Name.ToLower() == "kindredecharge" && !sender.IsMe) { KindredECharge = sender as Obj_AI_Hero; } }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && args.Buff.Name.ToLower() == "kogmawbioarcanebarrage") { bioArcaneActive = true; } }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { rqTumbleBuffEndOfTime = GetValue<bool>("Misc.R.DontAttack") && sender.IsMe && args.Buff.Name.ToLower() == "vaynetumblefade" ? args.Buff.EndTime : 0; }
internal static void OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { try { if (!sender.IsMe) { return; } if (args.Buff.DisplayName.Equals("BlindMonkFlurry", StringComparison.InvariantCultureIgnoreCase)) { LeeSin.PassiveStacks = 2; } if (args.Buff.DisplayName.Equals("BlindMonkQTwoDash", StringComparison.InvariantCultureIgnoreCase)) { LeeSin.isInQ2 = true; } } catch (Exception e) { Console.WriteLine("@PassiveManager.cs: Can not {0} -", e); throw; } }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsEnemy && sender.IsChampion() && ShineCommon.Utility.IsImmobileTarget(sender as Obj_AI_Hero) && Spells[Q].IsInRange(sender) && Config.Item("MAUTOQIMMO").GetValue <bool>()) { if (Spells[Q].IsReady()) { Spells[Q].Cast(sender.ServerPosition); } } }
/// <summary> /// OnBuffAdd event. /// </summary> /// <param name="sender"> /// The sender /// </param> /// <param name="args"> /// The event data /// </param> private void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (!sender.IsMe) { return; } if (args.Buff.DisplayName == "PoppyPassiveBuff" || args.Buff.DisplayName == "SonaPassiveReady") { this.ResetSwingTimer(); } }
/// <summary> /// Fired when a buff is added. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="Obj_AI_BaseBuffAddEventArgs" /> instance containing the event data.</param> public static void OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && Vars.W.IsReady() && Vars.Menu["spells"]["w"]["antigrab"].GetValue <MenuBool>().Value) { if (args.Buff.Name.Equals("ThreshQ") || args.Buff.Name.Equals("rocketgrab2")) { Vars.W.Cast( GameObjects.Player.ServerPosition.Extend(GameObjects.Player.ServerPosition, -Vars.W.Range)); } } }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe) { string buffname = args.Buff.Name.ToLower(); if (buffname == "jaycestancegun" || buffname == "jaycestancehammer" || buffname == "swainmetamorphism" || buffname == "gnartransform" || buffname == "rengarqbase" || buffname == "rengarqemp") { ResetOrbwalkValues(); } } }
protected override void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe || !(sender is Obj_AI_Hero) || !sender.IsEnemy) { return; } if (args.Buff.Type == BuffType.Poison) { _poisonTargets.Add((Obj_AI_Hero)sender); } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { var senderAsHero = sender as Obj_AI_Hero; if (Config.Auto.AutoE.AutoE1 && senderAsHero != null && args.Buff.Name.Equals("rocketgrab2", StringComparison.OrdinalIgnoreCase) && args.Buff.Caster.IsMe) { SpellManager.E.Cast(); } }
protected override void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe || !(sender is Obj_AI_Hero) || !sender.IsEnemy) { return; } if (args.Buff.Name == "urgotcorrosivedebuff") { _poisonTargets.Add((Obj_AI_Hero)sender); } }
protected override void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (!sender.IsMe) { return; } if (args.Buff.DisplayName == "LucianPassiveBuff") { _hasBuff = true; } }
static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && (args.Buff.DisplayName.ToLower().Contains("hand of baron") || args.Buff.Name.ToLower().Contains("baron") || args.Buff.Name.ToLower().Contains("worm"))) { Utility.DelayAction.Add( 250, () => { Levelmanager.LevelManager.RaiseWaifuEXP(ResourcePriority.BaronKill); LastEventTick = Game.Time; Utility.DelayAction.Add(delay, ShowOnKillWaifu); }); } }
static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && (args.Buff.DisplayName.ToLower().Contains("hand of baron") || args.Buff.Name.ToLower().Contains("baron") || args.Buff.Name.ToLower().Contains("worm"))) { Utility.DelayAction.Add( 250, () => { Levelmanager.LevelManager.RaiseWaifuEXP(ResourcePriority.BaronKill); LastEventTick = Game.Time; Utility.DelayAction.Add(delay, ShowOnKillWaifu); }); } }
/// <summary> /// OnBuffAdd Event /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsChampion() && sender.IsEnemy) { var stasis = s_StasisBuffs.FirstOrDefault(p => args.Buff.Name.Contains(p.Item1)); if (stasis != null) { s_DetectedStasises.Add(new Stasis { Unit = sender, StartTick = Utils.TickCount, Duration = stasis.Item2, Name = stasis.Item1, Processed = false }); } } }
/// <summary> /// Fired when a buff is added. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="Obj_AI_BaseBuffAddEventArgs" /> instance containing the event data.</param> public static void OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && Variables.E.IsReady() && Variables.EMenu.Item("antigrab").IsActive()) { if (args.Buff.Name.Equals("ThreshQ") || args.Buff.Name.Equals("rocketgrab2")) { Variables.E.Cast( ObjectManager.Player.ServerPosition.Extend( ObjectManager.Player.ServerPosition, -Variables.E.Range)); } } }
static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { foreach (var ally in Activator.Allies()) { if (sender.IsValidTarget(1000) && !sender.IsZombie && sender.NetworkId == ally.Player.NetworkId) { if (args.Buff.Name == "rengarralertsound") { ally.HitTypes.Add(HitType.Stealth); Utility.DelayAction.Add(100 + _random.Next(200, 450), () => ally.HitTypes.Remove(HitType.Stealth)); } } } }
private static void OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs Args) { if (!myMenu.Item("autoW").GetValue <Boolean>()) { return; } if (W.IsReady() && sender.IsEnemy && sender.IsChampion() && sender.Distance(myHero) < W.Range) { if (Args.Buff.Type == BuffType.Stun || Args.Buff.Type == BuffType.Taunt || Args.Buff.Type == BuffType.Knockup || Args.Buff.Type == BuffType.Snare) { W.Cast(sender.Position); } } }
static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { #region Buffs foreach (var ally in Activator.Allies()) { if (sender.IsValidTarget(1000) && !sender.IsZombie && sender.NetworkId == ally.Player.NetworkId) { if (args.Buff.Name == "rengarralertsound") { Projections.PredictTheDamage(sender, ally, new Gamedata(), HitType.Stealth, "handlers.OnBuffAdd"); } } } #endregion }
private static void Debugger(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (_root.Item("loaddebug").GetValue<bool>()) { if (_debug.Item("debug").GetValue<bool>() && args.Buff.Caster.IsValid) { var msg = sender.Name + " : " + (args.Buff.Name.ToLower()) + " : " + (args.Buff.EndTime - args.Buff.StartTime) + " : " + (args.Buff.Type); if (args.Buff.Caster.Name == _debug.Item("debugtarget").GetValue<StringList>().SelectedValue) { Console.WriteLine(msg); Game.PrintChat(msg); } } } }
private static void Debugger(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (_root.Item("loaddebug").GetValue <bool>()) { if (_debug.Item("debug").GetValue <bool>() && args.Buff.Caster.IsValid) { var msg = sender.Name + " : " + (args.Buff.Name.ToLower()) + " : " + (args.Buff.EndTime - args.Buff.StartTime) + " : " + (args.Buff.Type); if (args.Buff.Caster.Name == _debug.Item("debugtarget").GetValue <StringList>().SelectedValue) { Console.WriteLine(msg); Game.PrintChat(msg); } } } }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && Config.Item("autoEgrab", true).GetValue <bool>() && E.IsReady()) { if (args.Buff.Name == "ThreshQ" || args.Buff.Name == "rocketgrab2") { var dashPos = Dash.CastDash(true); if (!dashPos.IsZero) { E.Cast(dashPos); } else { E.Cast(Game.CursorPos); } } } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { Debugger(sender, args); var hero = sender as Obj_AI_Hero; if (hero != null && args.Buff.Caster.IsValid) { var buff = new Buff(args.Buff.Name.ToLower(), args.Buff.StartTime, args.Buff.EndTime, hero); var o = Resources.ResourceManager.GetObject(args.Buff.Name.ToLower()); var bmp = (Bitmap)o; if (bmp != null) { NewAura(hero, buff, bmp); } } }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { var hero = sender as Obj_AI_Hero; if (hero != null && hero.CheckTeam()) { if (args.Buff.Name == "orianaghostself") { foreach (KeyValuePair<int, ObjectTrackerInfo> entry in ObjectTracker.objTracker) { var info = entry.Value; if (entry.Value.Name == "TheDoomBall") { info.usePosition = false; info.obj = hero; } } } } }
/// <summary> /// Called on buff add. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> internal static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { try { if (!sender.IsMe) { return; } if (args.Buff.DisplayName.Equals(Misc.BlindMonkFlurry, StringComparison.InvariantCultureIgnoreCase)) { FlurryStacks = 2; } } catch (Exception e) { Logging.AddEntry(LoggingEntryType.Error, "@PassiveManager.cs: Can not {0} -", e); throw; } }
static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { #region Buffs foreach (var ally in Activator.Allies()) { if (sender.NetworkId == ally.Player.NetworkId) { if (args.Buff.Name == "rengarralertsound") { Projections.EmulateDamage(sender, ally, new Gamedata { SDataName = "Stealth" }, HitType.Stealth, "handlers.OnBuffAdd"); } } } #endregion }
internal static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { var hero = sender as Obj_AI_Hero; if (hero != null && hero.IsEnemy && KL.SpellTimer["Javelin"].IsReady() && Root.Item("ndhqimm").GetValue <bool>()) { if (hero.IsValidTarget(KL.Spells["Javelin"].Range)) { if (args.Buff.Type == BuffType.Stun || args.Buff.Type == BuffType.Snare || args.Buff.Type == BuffType.Taunt || args.Buff.Type == BuffType.Knockback) { if (!KL.CatForm()) { KL.Spells["Javelin"].Cast(hero); KL.Spells["Javelin"].CastIfHitchanceEquals(hero, HitChance.Immobile); } else { if (KL.Spells["Aspect"].IsReady() && KL.Spells["Javelin"].Cast(hero) == Spell.CastStates.Collision) { KL.Spells["Aspect"].Cast(); } } } } } if (hero != null && hero.IsEnemy && KL.SpellTimer["Bushwhack"].IsReady() && Root.Item("ndhwimm").GetValue <bool>()) { if (hero.IsValidTarget(KL.Spells["Bushwhack"].Range)) { if (args.Buff.Type == BuffType.Stun || args.Buff.Type == BuffType.Snare || args.Buff.Type == BuffType.Taunt || args.Buff.Type == BuffType.Knockback) { KL.Spells["Bushwhack"].Cast(hero); KL.Spells["Bushwhack"].CastIfHitchanceEquals(hero, HitChance.Immobile); } } } }
private static void OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if ((sender is Obj_AI_Hero) && sender.IsValidTarget(float.MaxValue, false)) { var h = (Obj_AI_Hero)sender; Console.WriteLine("{0} - {1}", h.ChampionName, args.Buff.Name); } if ((sender is Obj_AI_Hero) && sender.IsValidTarget() && (args.Buff.Name == "threshqfakeknockup" || args.Buff.Name == "ThreshQ")) { HookedUnit = (Obj_AI_Hero)sender; Console.WriteLine("Hooked - {0}", HookedUnit.ChampionName); HookEndTick = Utils.TickCount + 1500f; LeagueSharp.Common.Utility.DelayAction.Add((1500 + Game.Ping + 250), () => { HookEndTick = 0; HookedUnit = null; }); } }
private static void OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if ((sender is Obj_AI_Hero) && sender.IsValidTarget(float.MaxValue, false)) { var h = (Obj_AI_Hero)sender; Console.WriteLine("{0} - {1}", h.ChampionName, args.Buff.Name); } if ((sender is Obj_AI_Hero) && sender.IsValidTarget() && (args.Buff.Name == "threshqfakeknockup" || args.Buff.Name == "ThreshQ")) { HookedUnit = (Obj_AI_Hero)sender; Console.WriteLine("Hooked - {0}", HookedUnit.ChampionName); HookEndTick = Utils.TickCount + 1500f; LeagueSharp.Common.Utility.DelayAction.Add((1500 + Game.Ping + 250), () => { HookEndTick = 0; HookedUnit = null; }); } }
private void Obj_AI_Hero_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (args.Buff.Name.Equals(this.tahmEatingPassive)) { this.lastPosBeforeSwallowing = ObjectManager.Player.Position; var hero = sender as Obj_AI_Hero; if (hero != null) { if (hero.IsAlly) { this.swallowedUnit = SwallowedUnit.Ally; } else { this.swallowedUnit = SwallowedUnit.Enemy; } return; } var minion = sender as Obj_AI_Minion; if (minion != null) { this.swallowedUnit = SwallowedUnit.Minion; } } else if (args.Buff.Name.Equals(this.tahmEatPassive.ToLower()) && !this.swallowedUnit.HasFlag(SwallowedUnit.Enemy | SwallowedUnit.Ally)) { this.lastPosBeforeSwallowing = ObjectManager.Player.Position; var hero = sender as Obj_AI_Hero; if (hero != null) { if (hero.IsAlly) { this.swallowedUnit = SwallowedUnit.Ally; } } } }
private static void Obj_AI_Hero_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsEnemy && args.Buff.Name == "ThreshQ") { Marked = sender; } }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { return; if (sender.IsMe) Program.debug(args.Buff.Name); }
private void OnObjAiBaseBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { try { if (args.Buff.Caster.IsMe && sender.IsAlly && args.Buff.Name.Equals("kalistapaltarbuff", StringComparison.OrdinalIgnoreCase)) { var hero = sender as Obj_AI_Hero; if (hero != null) { SoulBound.Unit = hero; } } var target = sender as Obj_AI_Hero; if (target != null) { if (SoulBound.Unit != null && sender.IsEnemy && args.Buff.Caster.NetworkId == SoulBound.Unit.NetworkId && args.Buff.Name.Equals("rocketgrab2", StringComparison.OrdinalIgnoreCase) && args.Buff.IsActive) { if (Menu.Item(Menu.Name + ".ultimate.blitzcrank.r").GetValue<bool>() && !Menu.Item(Menu.Name + ".ultimate.blitzcrank.blacklist." + target.ChampionName) .GetValue<bool>() && R.IsReady() && SoulBound.Unit.Distance(Player) < R.Range) { if (!SoulBound.Unit.UnderTurret(false) && SoulBound.Unit.Distance(sender) > 750f && SoulBound.Unit.Distance(Player) > R.Range / 3f) { R.Cast(); } } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected override void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe || !(sender is Obj_AI_Hero) || !sender.IsEnemy) return; if (args.Buff.Type == BuffType.Poison) { _poisonTargets.Add((Obj_AI_Hero)sender); Console.WriteLine("Added: " + _poisonTargets.Count); } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { foreach (var hero in Activator.ChampionPriority()) { if (hero.Player.NetworkId == sender.NetworkId) { if (args.Buff.Type == BuffType.SpellImmunity || args.Buff.Type == BuffType.Invulnerability) { hero.Immunity = true; } foreach (var buff in spelldebuffdata.debuffs) { if (buff.Name != args.Buff.Name.ToLower()) { continue; } if (buff.Damage) { buff.Included = true; buff.Sender = sender; } if (buff.Evade) { Utility.DelayAction.Add(buff.EvadeTimer, delegate { if (hero.Player.HasBuff(buff.Name, true)) { hero.IncomeDamage = 1; hero.HitTypes.Add(HitType.Ultimate); } }); } if (buff.Cleanse) { if (spelldata.summoners.Any(x => x.Name == "summonerboost") || spelldata.items.Any(x => cleansers.Any(y => x.Name == y))) { Utility.DelayAction.Add(buff.CleanseTimer, delegate { hero.IncomeDamage = 1; hero.ForceQSS = true; }); } } if (buff.QSSIgnore) { return; } } #region Boost if (spelldata.summoners.Any(x => x.Name == "summonerboost")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("summonerboostcsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("summonerboostccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("summonerboostctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("summonerboostcstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("summonerboostcfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("summonerboostcflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("summonerboostcpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("summonerboostcblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("summonerboostcsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("summonerboostcpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("summonerboostcslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("summonerboostcexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot") { hero.IncomeDamage = 1; hero.CleanseBuffCount = hero.CleanseBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.CleanseHighestBuffTime) { hero.CleanseHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } } #endregion #region Dervish if (spelldata.items.Any(x => x.Name == "Dervish")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Dervishcsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Dervishccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Dervishctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Dervishcstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Dervishcfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Dervishcflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Dervishcpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Dervishcblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Dervishcsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Dervishcpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Dervishcslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Dervishcexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Dervishcignote").GetValue <bool>()) { hero.IncomeDamage = 1; hero.DervishBuffCount = hero.DervishBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.DervishHighestBuffTime) { hero.DervishBuffCount = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } } #endregion #region Quicksilver if (spelldata.items.Any(x => x.Name == "Quicksilver")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Quicksilvercsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Quicksilverccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Quicksilverctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Quicksilvercstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Quicksilvercfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Quicksilvercflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Quicksilvercpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Quicksilvercblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Quicksilvercsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Quicksilvercpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Quicksilvercslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Quicksilvercexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Quicksilvercignote").GetValue <bool>()) { hero.IncomeDamage = 1; hero.QSSBuffCount = hero.QSSBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.QSSHighestBuffTime) { hero.QSSHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } } #endregion #region Mercurial if (spelldata.items.Any(x => x.Name == "Mercurial")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mercurialcsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mercurialccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mercurialctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mercurialcstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mercurialcfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mercurialcflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mercurialcpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mercurialcblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mercurialcsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mercurialcpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mercurialcslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mercurialcexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mercurialcignote").GetValue <bool>()) { hero.IncomeDamage = 1; hero.MercurialBuffCount = hero.MercurialBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MercurialHighestBuffTime) { hero.MercurialHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } } #endregion #region Mikaels if (spelldata.items.Any(x => x.Name == "Mikaels")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mikaelscsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mikaelsccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mikaelsctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mikaelscstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mikaelscfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mikaelscflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mikaelscpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mikaelscblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mikaelscsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mikaelscpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mikaelscslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mikaelscexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mikaelscignote").GetValue <bool>()) { hero.IncomeDamage = 1; hero.MikaelsBuffCount = hero.MikaelsBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MikaelsHighestBuffTime) { hero.MikaelsHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } } #endregion } } }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe) { string buffname = args.Buff.Name.ToLower(); if (buffname == "jaycestancegun" || buffname == "jaycestancehammer" || buffname == "swainmetamorphism" || buffname == "gnartransform" || buffname == "rengarqbase" || buffname == "rengarqemp") ResetOrbwalkValues(); } }
private void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if(sender.IsMe && Config.Item("autoEgrab", true).GetValue<bool>() && E.IsReady()) { if(args.Buff.Name == "ThreshQ" || args.Buff.Name == "rocketgrab2") { var dashPos = Dash.CastDash(true); if (!dashPos.IsZero) { E.Cast(dashPos); } else { E.Cast(Game.CursorPos); } } } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (args.Buff.Caster.IsEnemy && args.Buff.Name == "pyromania_particle") { Pyromania = true; } foreach (var hero in Activator.Allies()) { if (hero.Player.NetworkId != sender.NetworkId || args.Buff.Caster.Team == hero.Player.Team) { continue; } if (args.Buff.Type == BuffType.SpellImmunity || args.Buff.Type == BuffType.Invulnerability) { hero.Immunity = true; } foreach (var buff in spelldebuffdata.debuffs) { if (buff.Name != args.Buff.Name.ToLower()) { continue; } buff.Sender = (Obj_AI_Hero)args.Buff.Caster; buff.IncomeDamage = 10; if (buff.DoT) { buff.Included = true; hero.HasRecentAura = true; } if (buff.Evade) { Utility.DelayAction.Add(buff.EvadeTimer, delegate { if (hero.Player.HasBuff(buff.Name, true)) { hero.HitTypes.Add(HitType.Ultimate); } }); } if (buff.Cleanse) { if (spelldata.summoners.Any(x => x.Name == "summonerboost") || spelldata.items.Any(x => ilist.Any(y => x.Name == y))) { Utility.DelayAction.Add(buff.CleanseTimer, delegate { hero.ForceQSS = true; }); } } if (buff.QssIgnore) { return; } } #region Boost if (spelldata.summoners.Any(x => x.Name == "summonerboost")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("summonerboostcsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("summonerboostccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("summonerboostctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("summonerboostcstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("summonerboostcfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("summonerboostcflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("summonerboostcpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("summonerboostcblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("summonerboostcsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("summonerboostcpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("summonerboostcslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("summonerboostcexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot") { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.CleanseBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.CleanseHighestBuffTime) { hero.CleanseHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Dervish if (spelldata.items.Any(x => x.Name == "Dervish")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Dervishcsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Dervishccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Dervishctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Dervishcstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Dervishcfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Dervishcflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Dervishcpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Dervishcblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Dervishcsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Dervishcpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Dervishcslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Dervishcexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Dervishcignote").GetValue <bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.DervishBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.DervishHighestBuffTime) { hero.DervishBuffCount = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Quicksilver if (spelldata.items.Any(x => x.Name == "Quicksilver")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Quicksilvercsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Quicksilverccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Quicksilverctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Quicksilvercstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Quicksilvercfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Quicksilvercflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Quicksilvercpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Quicksilvercblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Quicksilvercsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Quicksilvercpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Quicksilvercslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Quicksilvercexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Quicksilvercignote").GetValue <bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.QSSBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.QSSHighestBuffTime) { hero.QSSHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Mercurial if (spelldata.items.Any(x => x.Name == "Mercurial")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mercurialcsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mercurialccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mercurialctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mercurialcstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mercurialcfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mercurialcflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mercurialcpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mercurialcblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mercurialcsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mercurialcpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mercurialcslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mercurialcexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mercurialcignote").GetValue <bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.MercurialBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MercurialHighestBuffTime) { hero.MercurialHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Mikaels if (spelldata.items.Any(x => x.Name == "Mikaels")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mikaelscsnare").GetValue <bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mikaelsccharm").GetValue <bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mikaelsctaunt").GetValue <bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mikaelscstun").GetValue <bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mikaelscfear").GetValue <bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mikaelscflee").GetValue <bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mikaelscpolymorph").GetValue <bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mikaelscblind").GetValue <bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mikaelscsupp").GetValue <bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mikaelscpoison").GetValue <bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mikaelscslow").GetValue <bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mikaelscexhaust").GetValue <bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mikaelscignote").GetValue <bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.MikaelsBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MikaelsHighestBuffTime) { hero.MikaelsHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion } }
public static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (!(sender is Obj_AI_Hero)) { return; } if (args.Buff.Name.Contains("exaltedwithbaronnashor") && Utils.GameTimeTickCount - args.Buff.StartTime * 1000 <= BaronCamp.RespawnTimer * 1000) { BaronCamp.Mobs[0].State = 7; BaronCamp.Mobs[0].JustDied = false; BaronCamp.State = 7; BaronCamp.RespawnTime = Environment.TickCount + BaronCamp.RespawnTimer * 1000 - (Utils.GameTimeTickCount - (int)(args.Buff.StartTime * 1000) - 1000); } if (args.Buff.Name.Contains("tooltip_dragonslayerbuff") && Utils.GameTimeTickCount - (int)(args.Buff.StartTime * 1000) <= DragonCamp.RespawnTimer * 1000) { DragonCamp.Mobs[0].State = 7; DragonCamp.Mobs[0].JustDied = false; DragonCamp.State = 7; DragonCamp.RespawnTime = Environment.TickCount + DragonCamp.RespawnTimer * 1000 - (Utils.GameTimeTickCount - (int)(args.Buff.StartTime * 1000) - 1000); } }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsEnemy && sender.IsChampion() && ShineCommon.Utility.IsImmobileTarget(sender as Obj_AI_Hero)) { if (Spells[Q].IsReady() && sender.IsValidTarget(Spells[Q].Range) && Config.Item("MAUTOQIMMO").GetValue<bool>()) Spells[Q].Cast(sender.ServerPosition); if (Spells[W].IsReady() && sender.IsValidTarget(Spells[W].Range) && Config.Item("MAUTOWIMMO").GetValue<bool>()) Spells[W].Cast(sender.ServerPosition); } }
public virtual void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { // }
protected virtual void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { //for Champion used /* if (sender.IsMe) { Console.WriteLine(args.Buff.Name); }*/ }
internal static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { var hero = sender as Obj_AI_Hero; if (hero != null && hero.IsEnemy && KL.SpellTimer["Javelin"].IsReady() && Root.Item("ndhqimm").GetValue<bool>()) { if (hero.IsValidTarget(KL.Spells["Javelin"].Range)) { if (args.Buff.Type == BuffType.Stun || args.Buff.Type == BuffType.Snare || args.Buff.Type == BuffType.Taunt || args.Buff.Type == BuffType.Knockback) { if (!KL.CatForm()) { KL.Spells["Javelin"].Cast(hero); KL.Spells["Javelin"].CastIfHitchanceEquals(hero, HitChance.Immobile); } else { if (KL.Spells["Aspect"].IsReady() && KL.Spells["Javelin"].Cast(hero) == Spell.CastStates.Collision) KL.Spells["Aspect"].Cast(); } } } } if (hero != null && hero.IsEnemy && KL.SpellTimer["Bushwhack"].IsReady() && Root.Item("ndhwimm").GetValue<bool>()) { if (hero.IsValidTarget(KL.Spells["Bushwhack"].Range)) { if (args.Buff.Type == BuffType.Stun || args.Buff.Type == BuffType.Snare || args.Buff.Type == BuffType.Taunt || args.Buff.Type == BuffType.Knockback) { KL.Spells["Bushwhack"].Cast(hero); KL.Spells["Bushwhack"].CastIfHitchanceEquals(hero, HitChance.Immobile); } } } }
protected override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsEnemy && sender.IsChampion() && Data.IsImmobilizeBuff(args.Buff.Type) && AutoGrabMinHealth <= ObjectManager.Player.HealthPercent) { if (Spells[Q].IsReady() && sender.IsValidTarget(Spells[Q].Range) && AutoGrabImmobile && !IsBlacklistedAutoGrab(sender as Obj_AI_Hero) && !Spells[Q].GetCollisionFlags(ObjectManager.Player.ServerPosition.To2D(), sender.ServerPosition.To2D()).HasFlag(SCommon.Prediction.Collision.Flags.Minions)) Spells[Q].Cast(sender.ServerPosition); } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { }
private void OnObjAiBaseBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { try { if (args.Buff.Caster.IsMe && sender.IsAlly && args.Buff.Name.Equals("kalistapaltarbuff", StringComparison.OrdinalIgnoreCase)) { var hero = sender as Obj_AI_Hero; if (hero != null) { SoulBound.Unit = hero; } } var target = sender as Obj_AI_Hero; if (target != null) { if (SoulBound.Unit != null && sender.IsEnemy && args.Buff.Caster.NetworkId == SoulBound.Unit.NetworkId && args.Buff.IsActive && SoulBound.Unit.Distance(Player) < R.Range && R.IsReady()) { if (args.Buff.Name.Equals("rocketgrab2", StringComparison.OrdinalIgnoreCase)) { if (Menu.Item(Menu.Name + ".ultimate.blitzcrank.r").GetValue<bool>() && !HeroListManager.Check("blitzcrank", target)) { if (!SoulBound.Unit.UnderTurret(false) && SoulBound.Unit.Distance(sender) > 750f && SoulBound.Unit.Distance(Player) > R.Range / 3f) { R.Cast(); } } } else if (args.Buff.Name.Equals("tahmkenchwdevoured", StringComparison.OrdinalIgnoreCase)) { if (Menu.Item(Menu.Name + ".ultimate.tahm-kench.r").GetValue<bool>() && !HeroListManager.Check("tahm-kench", target)) { if (!SoulBound.Unit.UnderTurret(false) && (SoulBound.Unit.Distance(sender) > Player.AttackRange || GameObjects.AllyHeroes.Where( a => a.NetworkId != SoulBound.Unit.NetworkId && a.NetworkId != Player.NetworkId) .Any(t => t.Distance(Player) > 600) || GameObjects.AllyTurrets.Any(t => t.Distance(Player) < 600))) { R.Cast(); } } } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
protected virtual void ObjAiBaseOnOnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (args.Buff.Caster.IsEnemy && args.Buff.Name == "pyromania_particle") Pyromania = true; foreach (var hero in Activator.Allies()) { if (hero.Player.NetworkId != sender.NetworkId || args.Buff.Caster.Team == hero.Player.Team) continue; if (args.Buff.Type == BuffType.SpellImmunity || args.Buff.Type == BuffType.Invulnerability) hero.Immunity = true; foreach (var buff in spelldebuffdata.debuffs) { if (buff.Name != args.Buff.Name.ToLower()) continue; buff.Sender = (Obj_AI_Hero) args.Buff.Caster; buff.IncomeDamage = 10; if (buff.DoT) { buff.Included = true; hero.HasRecentAura = true; } if (buff.Evade) { Utility.DelayAction.Add(buff.EvadeTimer, delegate { if (hero.Player.HasBuff(buff.Name, true)) hero.HitTypes.Add(HitType.Ultimate); }); } if (buff.Cleanse) { if (spelldata.summoners.Any(x => x.Name == "summonerboost") || spelldata.items.Any(x => ilist.Any(y => x.Name == y))) { Utility.DelayAction.Add(buff.CleanseTimer, delegate { hero.ForceQSS = true; }); } } if (buff.QssIgnore) return; } #region Boost if (spelldata.summoners.Any(x => x.Name == "summonerboost")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("summonerboostcsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("summonerboostccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("summonerboostctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("summonerboostcstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("summonerboostcfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("summonerboostcflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("summonerboostcpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("summonerboostcblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("summonerboostcsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("summonerboostcpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("summonerboostcslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("summonerboostcexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot") { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.CleanseBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.CleanseHighestBuffTime) { hero.CleanseHighestBuffTime = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Dervish if (spelldata.items.Any(x => x.Name == "Dervish")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Dervishcsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Dervishccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Dervishctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Dervishcstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Dervishcfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Dervishcflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Dervishcpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Dervishcblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Dervishcsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Dervishcpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Dervishcslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Dervishcexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Dervishcignote").GetValue<bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.DervishBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.DervishHighestBuffTime) { hero.DervishBuffCount = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Quicksilver if (spelldata.items.Any(x => x.Name == "Quicksilver")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Quicksilvercsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Quicksilverccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Quicksilverctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Quicksilvercstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Quicksilvercfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Quicksilvercflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Quicksilvercpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Quicksilvercblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Quicksilvercsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Quicksilvercpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Quicksilvercslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Quicksilvercexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Quicksilvercignote").GetValue<bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.QSSBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.QSSHighestBuffTime) { hero.QSSHighestBuffTime = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Mercurial if (spelldata.items.Any(x => x.Name == "Mercurial")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mercurialcsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mercurialccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mercurialctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mercurialcstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mercurialcfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mercurialcflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mercurialcpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mercurialcblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mercurialcsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mercurialcpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mercurialcslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mercurialcexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mercurialcignote").GetValue<bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.MercurialBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MercurialHighestBuffTime) { hero.MercurialHighestBuffTime = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion #region Mikaels if (spelldata.items.Any(x => x.Name == "Mikaels")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mikaelscsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mikaelsccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mikaelsctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mikaelscstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mikaelscfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mikaelscflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mikaelscpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mikaelscblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mikaelscsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mikaelscpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mikaelscslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mikaelscexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mikaelscignote").GetValue<bool>()) { // dont allow the same buff to be applied multiple times for e.g Poison if (args.Buff.Name != hero.LastDebuff || Utils.GameTimeTickCount - hero.LastDebuffTimestamp >= 2000) { hero.MikaelsBuffCount += 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MikaelsHighestBuffTime) { hero.MikaelsHighestBuffTime = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } hero.LastDebuff = args.Buff.Name; hero.LastDebuffTimestamp = Utils.GameTimeTickCount; } } } #endregion } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { ChampionClass.Obj_AI_Base_OnBuffAdd(sender, args); }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender != null && args != null) if (args.Buff.Caster.Type == GameObjectType.obj_AI_Hero) { var buffCaster = args.Buff.Caster as Obj_AI_Hero; if (buffCaster.ChampionName == "Rammus" && args.Buff.Type == BuffType.Stun) return; if (buffCaster.ChampionName == "LeeSin" && args.Buff.Type == BuffType.Stun) return; if (buffCaster.ChampionName == "Alistar" && args.Buff.Type == BuffType.Stun) return; if (Menu.Item("Cleanser.BuffType." + args.Buff.Type) != null && Menu.Item("Cleanser.BuffType." + args.Buff.Type).GetValue<bool>()) { Utility.DelayAction.Add( Menu.Item("Cleanser.Use Humanizer").GetValue<bool>() ? new Random().Next(150, 280) : 20, () => { if (Menu.Item("Cleanser.Mode").GetValue<StringList>().SelectedValue == "Combo" ? MenuProvider.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo : true) { if (sender.IsMe) { var item = _cleanserList.Where( x => x.CleanserTargets.Contains(CleanserTarget.Me) && Menu.Item("Cleanser.Use" + x.Id).GetValue<bool>() && Items.CanUseItem((int) x.Id)) .OrderBy(x => x.Priority) .FirstOrDefault(); if (item != null) { switch (item.Id) { case ItemId.Mikaels_Crucible: if (Menu.Item("Cleanser.MikaelSettings.ForMe").GetValue<bool>()) if (_mikaelBuffType.Contains(args.Buff.Type)) Items.UseItem((int) item.Id, sender); break; default: Items.UseItem((int) item.Id, item.IsTargeted ? ObjectManager.Player : null); break; } } else { if (Menu.Item("Cleanser.UseCleanse").GetValue<bool>()) if (_cleanseSlot != SpellSlot.Unknown && _cleanseSlot.IsReady()) ObjectManager.Player.Spellbook.CastSpell(_cleanseSlot); } } else if (sender.IsAlly) { var item = _cleanserList.Where( x => x.CleanserTargets.Contains(CleanserTarget.Ally) && Menu.Item("Cleanser.Use" + x.Id).GetValue<bool>() && Items.CanUseItem((int) x.Id) && sender.IsValidTarget(x.Range, false)) .OrderBy(x => x.Priority) .FirstOrDefault(); if (item != null) { switch (item.Id) { case ItemId.Mikaels_Crucible: if (Menu.Item("Cleanser.MikaelSettings.ForAlly").GetValue<bool>()) if (_mikaelBuffType.Contains(args.Buff.Type)) Items.UseItem((int) item.Id, sender); break; default: Items.UseItem((int) item.Id, item.IsTargeted ? sender : null); break; } } } } }); } } }
private static void Qbuff(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && args.Buff.Name == "fioraqcd") { Q1 = 1; } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { foreach (var hero in Activator.Allies()) { if (hero.Player.NetworkId == sender.NetworkId) { if (args.Buff.Type == BuffType.SpellImmunity || args.Buff.Type == BuffType.Invulnerability) { hero.Immunity = true; } foreach (var buff in spelldebuffdata.debuffs) { if (buff.Name != args.Buff.Name.ToLower()) continue; if (buff.Damage) { buff.Included = true; buff.Sender = sender; } if (buff.Evade) { Utility.DelayAction.Add(buff.EvadeTimer, delegate { if (hero.Player.HasBuff(buff.Name, true)) { hero.IncomeDamage = 1; hero.HitTypes.Add(HitType.Ultimate); } }); } if (buff.Cleanse) { if (spelldata.summoners.Any(x => x.Name == "summonerboost") || spelldata.items.Any(x => CList.Any(y => x.Name == y))) { Utility.DelayAction.Add(buff.CleanseTimer, delegate { hero.IncomeDamage = 1; hero.ForceQSS = true; }); } } if (buff.QSSIgnore) return; } #region Boost if (spelldata.summoners.Any(x => x.Name == "summonerboost")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("summonerboostcsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("summonerboostccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("summonerboostctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("summonerboostcstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("summonerboostcfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("summonerboostcflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("summonerboostcpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("summonerboostcblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("summonerboostcsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("summonerboostcpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("summonerboostcslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("summonerboostcexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot") { hero.IncomeDamage = 1; hero.CleanseBuffCount = hero.CleanseBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.CleanseHighestBuffTime) hero.CleanseHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } #endregion #region Dervish if (spelldata.items.Any(x => x.Name == "Dervish")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Dervishcsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Dervishccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Dervishctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Dervishcstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Dervishcfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Dervishcflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Dervishcpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Dervishcblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Dervishcsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Dervishcpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Dervishcslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Dervishcexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Dervishcignote").GetValue<bool>()) { hero.IncomeDamage = 1; hero.DervishBuffCount = hero.DervishBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.DervishHighestBuffTime) hero.DervishBuffCount = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } #endregion #region Quicksilver if (spelldata.items.Any(x => x.Name == "Quicksilver")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Quicksilvercsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Quicksilverccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Quicksilverctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Quicksilvercstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Quicksilvercfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Quicksilvercflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Quicksilvercpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Quicksilvercblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Quicksilvercsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Quicksilvercpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Quicksilvercslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Quicksilvercexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Quicksilvercignote").GetValue<bool>()) { hero.IncomeDamage = 1; hero.QSSBuffCount = hero.QSSBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.QSSHighestBuffTime) hero.QSSHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } #endregion #region Mercurial if (spelldata.items.Any(x => x.Name == "Mercurial")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mercurialcsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mercurialccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mercurialctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mercurialcstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mercurialcfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mercurialcflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mercurialcpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mercurialcblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mercurialcsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mercurialcpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mercurialcslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mercurialcexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mercurialcignote").GetValue<bool>()) { hero.IncomeDamage = 1; hero.MercurialBuffCount = hero.MercurialBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MercurialHighestBuffTime) hero.MercurialHighestBuffTime = (int)(Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } #endregion #region Mikaels if (spelldata.items.Any(x => x.Name == "Mikaels")) { if (args.Buff.Type == BuffType.Snare && Activator.Origin.Item("Mikaelscsnare").GetValue<bool>() || args.Buff.Type == BuffType.Charm && Activator.Origin.Item("Mikaelsccharm").GetValue<bool>() || args.Buff.Type == BuffType.Taunt && Activator.Origin.Item("Mikaelsctaunt").GetValue<bool>() || args.Buff.Type == BuffType.Stun && Activator.Origin.Item("Mikaelscstun").GetValue<bool>() || args.Buff.Type == BuffType.Fear && Activator.Origin.Item("Mikaelscfear").GetValue<bool>() || args.Buff.Type == BuffType.Flee && Activator.Origin.Item("Mikaelscflee").GetValue<bool>() || args.Buff.Type == BuffType.Polymorph && Activator.Origin.Item("Mikaelscpolymorph").GetValue<bool>() || args.Buff.Type == BuffType.Blind && Activator.Origin.Item("Mikaelscblind").GetValue<bool>() || args.Buff.Type == BuffType.Suppression && Activator.Origin.Item("Mikaelscsupp").GetValue<bool>() || args.Buff.Type == BuffType.Poison && Activator.Origin.Item("Mikaelscpoison").GetValue<bool>() || args.Buff.Type == BuffType.Slow && Activator.Origin.Item("Mikaelscslow").GetValue<bool>() || args.Buff.Name == "summonerexhaust" && Activator.Origin.Item("Mikaelscexhaust").GetValue<bool>() || args.Buff.Name == "summonerdot" && Activator.Origin.Item("Mikaelscignote").GetValue<bool>()) { hero.IncomeDamage = 1; hero.MikaelsBuffCount = hero.MikaelsBuffCount + 1; if (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime) > hero.MikaelsHighestBuffTime) hero.MikaelsHighestBuffTime = (int) (Math.Ceiling(args.Buff.EndTime - args.Buff.StartTime)); } } #endregion } } }
private static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender != null && args != null && sender.IsMe) if (args.Buff.Caster.Type == GameObjectType.obj_AI_Hero) { var BuffCaster = args.Buff.Caster as Obj_AI_Hero; if (BuffCaster.ChampionName == "Rammus" && args.Buff.Type == BuffType.Stun) return; if (Menu.Item("Cleanser.BuffType." + args.Buff.Type.ToString()) != null && Menu.Item("Cleanser.BuffType." + args.Buff.Type.ToString()).GetValue<bool>()) { Utility.DelayAction.Add(Menu.Item("Cleanser.Use Humanizer").GetValue<bool>() ? new Random().Next(150, 280) : 20, () => { var item = CleanserList.Where(x => Menu.Item("Cleanser.Use" + x.ID).GetValue<bool>() && Items.CanUseItem((int)x.ID)).OrderBy(x => x.Priority).FirstOrDefault(); if (item != null) Items.UseItem((int)item.ID); else if (Menu.Item("Cleanser.UseCleanse").GetValue<bool>()) if (CleanseSlot != SpellSlot.Unknown && CleanseSlot.IsReady()) ObjectManager.Player.Spellbook.CastSpell(CleanseSlot); }); } } }
public override void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { }
private static void Ignitebuff(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { if (sender.IsMe && args.Buff.Name == "summonerdot" && Config.Item("ignite").GetValue<bool>() && Environment.TickCount - LastPlayedSound > 8000) PlaySound1(MYTITSAREONFIRE); //MY T**S ARE ON FIREEEE!!! }
public virtual void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args) { // }