private void UseBilgewaterCutlass(AIHeroClient target)
 {
     if (olafMenu.GetParamBool("koreanolaf.combomenu.items.bilgewater") &&
         ItemData.Bilgewater_Cutlass.GetItem().IsInRange(target) &&
         ItemData.Bilgewater_Cutlass.GetItem().IsReady())
     {
         ItemData.Bilgewater_Cutlass.GetItem().Cast(target);
     }
 }
Exemple #2
0
 private void Game_OnUpdate(EventArgs args)
 {
     if (olafMenu.GetParamBool("koreanolaf.miscmenu.pot.healthactive") &&
         ObjectManager.Player.HealthPercent
         < olafMenu.GetParamSlider("koreanolaf.miscmenu.pot.healthwhen") &&
         !ObjectManager.Player.HasBuff("RegenerationPotion") &&
         !ObjectManager.Player.InShop())
     {
         ItemData.Health_Potion.GetItem().Cast();
     }
 }
        private void Drawing_OnDraw(EventArgs args)
        {
            if (olafMenu.GetParamBool("koreanolaf.drawing.legacysaxe"))
            {
                Color color;

                switch (olafMenu.GetParamStringList("koreanolaf.drawing.legacysaxecolor"))
                {
                case 0:
                    color = Color.YellowGreen;
                    break;

                case 1:
                    color = Color.Red;
                    break;

                default:
                    color = Color.White;
                    break;
                }

                int width = olafMenu.GetParamSlider("koreanolaf.drawing.legacysaxewidth");

                Obj_AI_Base axe =
                    ObjectManager.Get <Obj_AI_Base>()
                    .FirstOrDefault(obj => obj.SkinName.ToLowerInvariant().Contains("olafaxe") && obj.IsVisible);

                if (axe != null)
                {
                    Render.Circle.DrawCircle(axe.Position, 50F, color, 7 * width);

                    var from = Drawing.WorldToScreen(ObjectManager.Player.Position.Extend(axe.Position, 140F));
                    var to   = Drawing.WorldToScreen(axe.Position.Shorten(ObjectManager.Player.Position, -58F));

                    Drawing.DrawLine(from.X, from.Y, to.X, to.Y, 2 * width, color);
                }
            }
        }
Exemple #4
0
        private void Drawing_OnDraw(System.EventArgs args)
        {
            if (!olafMenu.GetParamBool("koreanolaf.drawing.skillranges"))
            {
                return;
            }

            OlafSpell olafSpell = null;

            if (olafSpells.Q.UseOnCombo && olafSpells.Q.IsReady())
            {
                olafSpell = olafSpells.Q;
            }
            else if (olafSpells.E.UseOnCombo && olafSpells.E.IsReady())
            {
                olafSpell = olafSpells.E;
            }

            if (olafSpell != null)
            {
                Render.Circle.DrawCircle(ObjectManager.Player.Position, olafSpell.Range, Color.FromArgb(150, Color.DarkGreen), 5);
            }
        }
Exemple #5
0
        private void LaneClear()
        {
            LastHit();

            if (actionQueue.ExecuteNextAction(laneClearQueue))
            {
                return;
            }

            if (q.UseOnLaneClear && q.IsReady() && CheckManaToLaneClear())
            {
                MinionManager.FarmLocation farmLocation = q.GetLineFarmLocation(MinionManager.GetMinions(q.Range));
                if (farmLocation.MinionsHit >= olafMenu.GetParamSlider("koreanolaf.laneclearmenu.useqif"))
                {
                    var target = q.GetCollision(player.Position.To2D(), new List <Vector2>()
                    {
                        farmLocation.Position
                    })
                                 .OrderByDescending(minion => player.Distance(minion))
                                 .FirstOrDefault();

                    if (target != null)
                    {
                        q.Cast(target.Position);
                        return;
                    }
                }
                else
                {
                    Obj_AI_Base jungleMob =
                        MinionManager.GetMinions(q.Range / 1.5F, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth)
                        .FirstOrDefault();

                    if (jungleMob != null)
                    {
                        q.Cast(q.GetPrediction(jungleMob).CastPosition);
                    }
                }
            }

            if (w.UseOnLaneClear && w.IsReady() && CheckManaToLaneClear())
            {
                if (MinionManager.GetMinions(300F).Count() >= 3)
                {
                    actionQueue.EnqueueAction(laneClearQueue, () => true, () => w.Cast(), () => !w.IsReady());
                    return;
                }
                else if (
                    MinionManager.GetMinions(
                        300F,
                        MinionTypes.All,
                        MinionTeam.Neutral,
                        MinionOrderTypes.MaxHealth).Any())
                {
                    w.Cast();
                }
            }

            if (e.UseOnLaneClear && e.IsReady() && CheckHealthToLaneClear())
            {
                Obj_AI_Base target =
                    MinionManager.GetMinions(e.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth)
                    .FirstOrDefault();

                if (target != null)
                {
                    actionQueue.EnqueueAction(laneClearQueue, () => true, () => CastE(target), () => !e.IsReady());
                    return;
                }
            }

            if ((olafMenu.GetParamBool("koreanolaf.laneclearmenu.items.hydra") ||
                 olafMenu.GetParamBool("koreanolaf.laneclearmenu.items.tiamat")) &&
                (MinionManager.GetMinions(300F).Count() >= olafMenu.GetParamSlider("koreanolaf.laneclearmenu.items.when") ||
                 MinionManager.GetMinions(300F, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).Any()))
            {
                actionQueue.EnqueueAction(laneClearQueue, () => true, () => olafItems.UseItemsLaneClear(), () => true);
            }
        }