Example #1
0
 private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (Player.IsDead)
     {
         return;
     }
     if (sender.IsMe && Orbwalk.IsAutoAttack(args.SData.Name) && IsValid((Obj_AI_Base)args.Target) && SkillQ.IsReady())
     {
         var Obj   = (Obj_AI_Base)args.Target;
         var DmgAA = Player.GetAutoAttackDamage(Obj) * Math.Floor(SkillQ.Instance.Cooldown / (1 / (Player.PercentMultiplicativeAttackSpeedMod * 0.638)));
         if (Orbwalk.CurrentMode == Orbwalk.Mode.LastHit && ItemBool("Misc", "QLastHit") && SkillQ.GetHealthPrediction(Obj) + 5 <= GetBonusDmg(Obj) && (args.Target is Obj_AI_Minion || args.Target is Obj_AI_Turret))
         {
             SkillQ.Cast(PacketCast());
         }
         else if ((((Orbwalk.CurrentMode == Orbwalk.Mode.LaneClear || Orbwalk.CurrentMode == Orbwalk.Mode.LaneFreeze) && ItemBool("Clear", "Q") && (args.Target is Obj_AI_Minion || args.Target is Obj_AI_Turret)) || ((Orbwalk.CurrentMode == Orbwalk.Mode.Combo || Orbwalk.CurrentMode == Orbwalk.Mode.Harass) && ItemBool(Orbwalk.CurrentMode.ToString(), "Q") && args.Target is Obj_AI_Hero)) && (SkillQ.GetHealthPrediction(Obj) + 5 <= GetBonusDmg(Obj) || (!(args.Target is Obj_AI_Turret) && SkillQ.GetHealthPrediction(Obj) + 5 > DmgAA + GetBonusDmg(Obj))))
         {
             SkillQ.Cast(PacketCast());
         }
     }
     else if (sender.IsEnemy && ItemBool("Ultimate", "RSurvive") && SkillR.IsReady())
     {
         if (args.Target.IsMe && ((Orbwalk.IsAutoAttack(args.SData.Name) && (Player.Health - sender.GetAutoAttackDamage(Player, true)) * 100 / Player.MaxHealth <= ItemSlider("Ultimate", "RUnder")) || (args.SData.Name == "summonerdot" && (Player.Health - (sender as Obj_AI_Hero).GetSummonerSpellDamage(Player, Damage.SummonerSpell.Ignite)) * 100 / Player.MaxHealth <= ItemSlider("Ultimate", "RUnder"))))
         {
             SkillR.Cast(PacketCast());
         }
         else if ((args.Target.IsMe || (Player.Position.Distance(args.Start) <= args.SData.CastRange[0] && Player.Position.Distance(args.End) <= Orbwalk.GetAutoAttackRange())) && Damage.Spells.ContainsKey((sender as Obj_AI_Hero).ChampionName))
         {
             for (var i = 3; i > -1; i--)
             {
                 if (Damage.Spells[(sender as Obj_AI_Hero).ChampionName].FirstOrDefault(a => a.Slot == (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false) && a.Stage == i) != null)
                 {
                     if ((Player.Health - (sender as Obj_AI_Hero).GetSpellDamage(Player, (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false), i)) * 100 / Player.MaxHealth <= ItemSlider("Ultimate", "RUnder"))
                     {
                         SkillR.Cast(PacketCast());
                     }
                 }
             }
         }
     }
 }
Example #2
0
 private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (Player.IsDead)
     {
         return;
     }
     if (sender.IsMe && Orbwalk.IsAutoAttack(args.SData.Name) && IsValid((Obj_AI_Base)args.Target) && SkillQ.IsReady())
     {
         if (args.Target is Obj_AI_Hero && Orbwalk.CurrentMode == Orbwalk.Mode.Harass && ItemBool("Harass", "Q"))
         {
             SkillQ.Cast(PacketCast());
         }
         else if (args.Target is Obj_AI_Minion && CanKill((Obj_AI_Minion)args.Target, SkillQ) && ((Orbwalk.CurrentMode == Orbwalk.Mode.LastHit && ItemBool("Misc", "QLastHit")) || ((Orbwalk.CurrentMode == Orbwalk.Mode.LaneClear || Orbwalk.CurrentMode == Orbwalk.Mode.LaneFreeze) && ItemBool("Clear", "Q") && ItemList("Clear", "QMode") == 1)))
         {
             SkillQ.Cast(PacketCast());
         }
     }
     else if (sender.IsEnemy && ItemBool("Misc", "WSurvive") && SkillW.IsReady())
     {
         if (args.Target.IsMe && (Orbwalk.IsAutoAttack(args.SData.Name) && Player.Health <= sender.GetAutoAttackDamage(Player, true)))
         {
             SkillW.Cast(PacketCast());
         }
         else if ((args.Target.IsMe || (Player.Position.Distance(args.Start) <= args.SData.CastRange[0] && Player.Position.Distance(args.End) <= Orbwalk.GetAutoAttackRange())) && Damage.Spells.ContainsKey((sender as Obj_AI_Hero).ChampionName))
         {
             for (var i = 3; i > -1; i--)
             {
                 if (Damage.Spells[(sender as Obj_AI_Hero).ChampionName].FirstOrDefault(a => a.Slot == (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false) && a.Stage == i) != null)
                 {
                     if (Player.Health <= (sender as Obj_AI_Hero).GetSpellDamage(Player, (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false), i))
                     {
                         SkillW.Cast(PacketCast());
                     }
                 }
             }
         }
     }
 }
Example #3
0
 private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (Player.IsDead)
     {
         return;
     }
     if (sender.IsMe)
     {
         if (args.SData.Name == "BlindMonkQOne")
         {
             QCasted = true;
             Utility.DelayAction.Add((Orbwalk.CurrentMode == Orbwalk.Mode.LaneClear || Orbwalk.CurrentMode == Orbwalk.Mode.LaneFreeze) ? 2800 : 2200, () => QCasted = false);
         }
         if (args.SData.Name == "BlindMonkWOne")
         {
             WCasted = true;
             Utility.DelayAction.Add((Orbwalk.CurrentMode == Orbwalk.Mode.LaneClear || Orbwalk.CurrentMode == Orbwalk.Mode.LaneFreeze) ? 2800 : 1000, () => WCasted = false);
             JumpCasted = true;
             Utility.DelayAction.Add(1000, () => JumpCasted = false);
         }
         if (args.SData.Name == "BlindMonkEOne")
         {
             ECasted = true;
             Utility.DelayAction.Add((Orbwalk.CurrentMode == Orbwalk.Mode.LaneClear || Orbwalk.CurrentMode == Orbwalk.Mode.LaneFreeze) ? 2800 : 2200, () => ECasted = false);
         }
         if (args.SData.Name == "BlindMonkRKick")
         {
             RCasted = true;
             Utility.DelayAction.Add(700, () => RCasted = false);
             if (ItemActive("StarCombo") || ItemActive("InsecCombo"))
             {
                 KickCasted = true;
                 Utility.DelayAction.Add(1000, () => KickCasted = false);
             }
         }
         if (ItemActive("InsecCombo") && ItemBool("Insec", "Flash") && FlashReady())
         {
             if (args.SData.Name == "blindmonkqtwo")
             {
                 FlyCasted = true;
                 Utility.DelayAction.Add(1000, () => FlyCasted = false);
             }
             else if (args.SData.Name == "BlindMonkWOne" && !WardCasted)
             {
                 Utility.DelayAction.Add((int)((Player.Position.Distance(GetInsecPos()) - args.Target.Position.Distance(GetInsecPos())) / SkillW.Speed * 1000 + 200), () => CastFlash(GetInsecPos()));
             }
         }
     }
     else if (sender.IsEnemy && ItemBool("Misc", "WSurvive") && SkillW.IsReady() && SkillW.Instance.Name == "BlindMonkWOne")
     {
         if (args.Target.IsMe && ((Orbwalk.IsAutoAttack(args.SData.Name) && Player.Health <= sender.GetAutoAttackDamage(Player, true)) || (args.SData.Name == "summonerdot" && Player.Health <= (sender as Obj_AI_Hero).GetSummonerSpellDamage(Player, Damage.SummonerSpell.Ignite))))
         {
             SkillW.Cast(PacketCast());
             return;
         }
         else if ((args.Target.IsMe || (Player.Position.Distance(args.Start) <= args.SData.CastRange[0] && Player.Position.Distance(args.End) <= Orbwalk.GetAutoAttackRange())) && Damage.Spells.ContainsKey((sender as Obj_AI_Hero).ChampionName))
         {
             for (var i = 3; i > -1; i--)
             {
                 if (Damage.Spells[(sender as Obj_AI_Hero).ChampionName].FirstOrDefault(a => a.Slot == (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false) && a.Stage == i) != null)
                 {
                     if (Player.Health <= (sender as Obj_AI_Hero).GetSpellDamage(Player, (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false), i))
                     {
                         SkillW.Cast(PacketCast());
                         return;
                     }
                 }
             }
         }
     }
 }
Example #4
0
        private void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }
            if (sender.IsMe)
            {
                if (Orbwalk.IsAutoAttack(args.SData.Name) && IsValid((Obj_AI_Base)args.Target) && (args.Target as Obj_AI_Base).Health + 5 <= GetBonusDmg((Obj_AI_Base)args.Target) && Orbwalk.CurrentMode == Orbwalk.Mode.LastHit && SkillW.IsReady() && args.Target is Obj_AI_Minion)
                {
                    SkillW.Cast(PacketCast());
                }
                if (args.SData.Name == "JaxCounterStrike")
                {
                    ECasted = true;
                    Utility.DelayAction.Add(1800, () => ECasted = false);
                }
                if (args.SData.Name == "jaxrelentlessattack")
                {
                    RCount = 0;
                    if (SkillW.IsReady() && IsValid((Obj_AI_Base)args.Target, Orbwalk.GetAutoAttackRange() + 50))
                    {
                        switch (Orbwalk.CurrentMode)
                        {
                        case Orbwalk.Mode.Combo:
                            if (ItemBool("Combo", "W") && ItemList("Combo", "WMode") == 1)
                            {
                                SkillW.Cast(PacketCast());
                            }
                            break;

                        case Orbwalk.Mode.LaneClear:
                            if (ItemBool("Clear", "W") && ItemList("Clear", "WMode") == 1)
                            {
                                SkillW.Cast(PacketCast());
                            }
                            break;

                        case Orbwalk.Mode.LaneFreeze:
                            if (ItemBool("Clear", "W") && ItemList("Clear", "WMode") == 1)
                            {
                                SkillW.Cast(PacketCast());
                            }
                            break;
                        }
                    }
                }
            }
            else if (sender.IsEnemy && ItemBool("Misc", "RSurvive") && SkillR.IsReady())
            {
                if (args.Target.IsMe && (Orbwalk.IsAutoAttack(args.SData.Name) && Player.Health <= sender.GetAutoAttackDamage(Player, true)))
                {
                    SkillR.Cast(PacketCast());
                }
                else if ((args.Target.IsMe || (Player.Position.Distance(args.Start) <= args.SData.CastRange[0] && Player.Position.Distance(args.End) <= Orbwalk.GetAutoAttackRange())) && Damage.Spells.ContainsKey((sender as Obj_AI_Hero).ChampionName))
                {
                    for (var i = 3; i > -1; i--)
                    {
                        if (Damage.Spells[(sender as Obj_AI_Hero).ChampionName].FirstOrDefault(a => a.Slot == (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false) && a.Stage == i) != null)
                        {
                            if (Player.Health <= (sender as Obj_AI_Hero).GetSpellDamage(Player, (sender as Obj_AI_Hero).GetSpellSlot(args.SData.Name, false), i))
                            {
                                SkillR.Cast(PacketCast());
                            }
                        }
                    }
                }
            }
        }