Пример #1
0
        /// <summary>
        /// Farming function
        /// </summary>
        static void LaneClear()
        {
            //Minions
            List <Obj_AI_Base> minions = MinionManager.GetMinions(player.Position, Q3.Range);

            //Farm locations for spells
            MinionManager.FarmLocation QPos = Q3.GetCircularFarmLocation(minions);
            //MinionManager.FarmLocation WPos = W.GetCircularFarmLocation(minions);
            MinionManager.FarmLocation EPos = E.GetCircularFarmLocation(minions);
            //Minons count
            int numToHit = menu.SubMenu("waveClear").Item("waveNum").GetValue <Slider>().Value;
            //Using of spells
            bool useQ = menu.SubMenu("waveClear").Item("UseQ").GetValue <bool>() && Q1.IsReady();
            //bool useW = menu.SubMenu("waveClear").Item("UseW").GetValue<bool>();
            bool useE = menu.SubMenu("waveClear").Item("UseE").GetValue <bool>() && E.IsReady();

            //Casts
            if (useQ && QPos.MinionsHit >= numToHit)
            {
                Q1.Cast(QPos.Position, true);
                SMouse.addMouseEvent(QPos.Position.To3D(), false, CRB);
            }
            //if (false && WPos.MinionsHit >= numToHit) W.Cast(WPos.Position, true);
            if (useE && EPos.MinionsHit >= numToHit)
            {
                E.Cast(EPos.Position, true);
                SMouse.addMouseEvent(EPos.Position.To3D(), false, CRB);
            }
        }
Пример #2
0
        static void Escape(escapeModes mode)
        {
            switch (mode)
            {
            case escapeModes.TOMOUSE:     //Escaping to mouse
            {
                Vector3 cursorPos = Game.CursorPos;
                Vector3 pos       = V3E(player.Position, cursorPos, (float)-15);
                if (!IsPassWall(player.Position, cursorPos))             //Escaping to mouse pos
                {
                    Vector3 pass = V3E(player.Position, cursorPos, 100); //Point to move closer to the wall (could be better, i know, i'll improve it)
                    player.IssueOrder(GameObjectOrder.MoveTo, new Vector3(pass.X, pass.Y, 0));
                    SMouse.addMouseEvent(new Vector3(pass.X, pass.Y, 0), true, false);
                }
                else         //Escape through the wall (Flash fail)
                {
                    Vector3 jumpPred = V3E(pos, cursorPos, 700);
                    if (IsWall(jumpPred.To2D()) && IsPassWall(player.Position, jumpPred))          //Can't we jump over?
                    {
                        Vector3 pass = V3E(player.Position, jumpPred, 100);                        //Point to move closer to the wall (could be better, i know, i'll improve it)
                        player.IssueOrder(GameObjectOrder.MoveTo, new Vector3(pass.X, pass.Y, 0)); //Move closer to the wall
                        SMouse.addMouseEvent(new Vector3(pass.X, pass.Y, 0), true, false);
                        return;
                    }
                    else      //Yes! We can!
                    {         //Stand still
                        player.IssueOrder(GameObjectOrder.MoveTo, new Vector3(player.Position.X, player.Position.Y, 0));
                    }
                }
                if (!W.IsReady())
                {
                    return;            //Simple!
                }
                W.Cast(pos);           //Poof! W cast!
                SMouse.addMouseEvent(pos, false, CRB);
                Wmode = WModes.ESCAPE; //WMode
            }
            break;

            case escapeModes.FROMTURRET:
            {
                Vector3 WPos      = V3E(player.Position, TUnit_obj.Position, 40);                    //Positions
                Vector3 escapePos = V3E(player.Position, TUnit_obj.Position, -450);
                player.IssueOrder(GameObjectOrder.MoveTo, new Vector3(escapePos.X, escapePos.Y, 0)); //Move away
                if (!W.IsReady())
                {
                    return;          //Simple!
                }
                W.Cast(WPos);        //Cast W to move away
                SMouse.addMouseEvent(WPos, false, CRB);
                //TUnit_obj.isAggred = false;//Turrent isn't focusing us anymore
                Wmode = WModes.ESCAPE;        //???PROFIT
            }
            break;
            }
        }
Пример #3
0
 static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser)
 {
     if (W.IsReady() && menu.SubMenu("misc").Item("antigapcloser").GetValue <bool>())
     {
         //if (gapcloser.SkillType == GapcloserType.Skillshot)
         W.Cast(gapcloser.End, true);     //TODO: разные интеррапты для лисинов\джарванов\леон
         SMouse.addMouseEvent(gapcloser.End, false, CRB);
         //else//Проверить работоспособность на разных гепклозерах
         // W.Cast(gapcloser.End);//СДЕЛАТЬ, БЛЯДЬ!
         Wmode = WModes.ANTIGAPCLOSER;
     }
 }
Пример #4
0
        /// <summary>
        /// Harass
        /// </summary>
        static void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q3.Range, TargetSelector.DamageType.Magical);

            if (menu.SubMenu("harass").Item("UseQ").GetValue <bool>() && Q1.IsReady())
            {
                CastQ(target);
                SMouse.addMouseEvent(target.Position, false, CRB);
            }
            target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
            if (menu.SubMenu("harass").Item("UseE").GetValue <bool>() && E.IsReady())
            {
                E.Cast(target);
                SMouse.addMouseEvent(target.Position, false, CRB);
            }
        }
Пример #5
0
 /// <summary>
 /// Interruptor
 /// </summary>
 /// <param name="unit">Unit that causing interruptable spell</param>
 /// <param name="spell">Spell that can be interrupted</param>
 static void Interrupter_OnPossibleToInterrupt(Obj_AI_Base unit, Interrupter2.InterruptableTargetEventArgs spell)
 {
     if (unit.IsAlly)
     {
         return;
     }
     if (W.IsReady() &&
         Vector3.Distance(player.Position, unit.Position) <= -1 + W.Range + W.Width / 2 &&
         menu.SubMenu("misc").Item("interrupt").GetValue <bool>() &&
         spell.DangerLevel >= Interrupter2.DangerLevel.Medium)
     {
         Vector3 pos = V3E(player.Position, unit.Position, -1 + Vector3.Distance(player.Position, unit.Position) - W.Width / 2);
         W.Cast(pos, true);
         SMouse.addMouseEvent(pos, false, CRB);
         Wmode = WModes.INTERRUPTOR;
     }
 }
Пример #6
0
        //And it's all stolen too :C
        static void CastQ(Obj_AI_Base target)
        {
            PredictionOutput prediction;

            if (Vector3.Distance(player.Position, target.Position) < Q1.Range)
            {
                var oldrange = Q1.Range;
                Q1.Range   = Q2.Range;
                prediction = Q1.GetPrediction(target, true);
                Q1.Range   = oldrange;
            }
            else if (Vector3.Distance(player.Position, target.Position) < Q2.Range)
            {
                var oldrange = Q2.Range;
                Q2.Range   = Q3.Range;
                prediction = Q2.GetPrediction(target, true);
                Q2.Range   = oldrange;
            }
            else if (Vector3.Distance(player.Position, target.Position) < Q3.Range)
            {
                prediction = Q3.GetPrediction(target, true);
            }
            else
            {
                return;
            }

            if (prediction.Hitchance >= HitChance.High)
            {
                if (ObjectManager.Player.ServerPosition.Distance(prediction.CastPosition) <= Q1.Range + Q1.Width)
                {
                    Vector3 p;
                    if (ObjectManager.Player.ServerPosition.Distance(prediction.CastPosition) > 300)
                    {
                        p = prediction.CastPosition -
                            100 *
                            (prediction.CastPosition.To2D() - ObjectManager.Player.ServerPosition.To2D()).Normalized()
                            .To3D();
                    }
                    else
                    {
                        p = prediction.CastPosition;
                    }

                    Q1.Cast(p);
                    SMouse.addMouseEvent(p, false, CRB);
                    lastQ = Game.Time;
                }
                else if (ObjectManager.Player.ServerPosition.Distance(prediction.CastPosition) <=
                         ((Q1.Range + Q2.Range) / 2))
                {
                    var p = ObjectManager.Player.ServerPosition.To2D()
                            .Extend(prediction.CastPosition.To2D(), Q1.Range - 100);

                    if (!CheckQCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q1.Cast(p.To3D());
                        SMouse.addMouseEvent(p.To3D(), false, CRB);
                        lastQ = Game.Time;
                    }
                }
                else
                {
                    var p = ObjectManager.Player.ServerPosition.To2D() +
                            Q1.Range *
                            (prediction.CastPosition.To2D() - ObjectManager.Player.ServerPosition.To2D()).Normalized
                                ();

                    if (!CheckQCollision(target, prediction.UnitPosition, p.To3D()))
                    {
                        Q1.Cast(p.To3D());
                        SMouse.addMouseEvent(p.To3D(), false, CRB);
                        lastQ = Game.Time;
                    }
                }
            }
        }
Пример #7
0
        /// <summary>
        /// OnGameLoad callback. Executes on loading game
        /// </summary>
        /// <param name="args"></param>
        static void Game_OnGameLoad(EventArgs args)
        {
            if (player.ChampionName != "Ziggs")
            {
                return;                                                   //Champion validation
            }
            //Spell init
            Q1 = new Spell(SpellSlot.Q, 850);
            Q2 = new Spell(SpellSlot.Q, 1125);
            Q3 = new Spell(SpellSlot.Q, 1400);
            W  = new Spell(SpellSlot.W, 970);
            E  = new Spell(SpellSlot.E, 870);
            R  = new Spell(SpellSlot.R, 5300);
            //SetSkillshot(float delay, float width, float speed, bool collision, SkillshotType type, Vector3 from = null, Vector3 rangeCheckFrom = null);
            Q1.SetSkillshot(0.3f, 130, 1700, false, SkillshotType.SkillshotCircle);
            Q2.SetSkillshot(0.25f + Q1.Delay, 130, 1700, false, SkillshotType.SkillshotCircle);
            Q3.SetSkillshot(0.30f + Q2.Delay, 130, 1700, false, SkillshotType.SkillshotCircle);
            W.SetSkillshot(0.250f, 275, 1800, false, SkillshotType.SkillshotCircle);
            E.SetSkillshot(1.000f, 235, 2700, false, SkillshotType.SkillshotCircle);
            R.SetSkillshot(1.014f, 525, 1750, false, SkillshotType.SkillshotCircle);
            SpellList.AddRange(new[] { Q3, W, E });
            //Ignite
            var ignite = player.Spellbook.GetSpell(player.GetSpellSlot("SummonerDot"));

            //Combo settings
            mainCombo.Add(Tuple.Create(SpellSlot.Q, 0));
            mainCombo.Add(Tuple.Create(SpellSlot.W, 0));
            mainCombo.Add(Tuple.Create(SpellSlot.E, 0));
            mainCombo.Add(Tuple.Create(SpellSlot.R, 0));
            //Menu loading
            LoadMenu();
            //Presets
            Wmode = WModes.NONE;
            try
            {
                foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>())
                {
                    if (hero.IsEnemy)
                    {
                        lastTimePinged.Add(new FEnemy(hero));
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            //Additional callbacks
            Game.OnUpdate  += Game_OnGameUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            AntiGapcloser.OnEnemyGapcloser     += AntiGapcloser_OnEnemyGapcloser;
            Interrupter2.OnInterruptableTarget += Interrupter_OnPossibleToInterrupt;
            GameObject.OnCreate     += GO_OnCreate;
            GameObject.OnDelete     += GO_OnRemove;
            Game.OnProcessPacket    += OnRecievePacket;
            Orbwalking.BeforeAttack += (a) =>
            {
                if (menu.Item("streamMouseOrb").GetValue <bool>())
                {
                    SMouse.addMouseEvent(a.Target.Position, false, CRB);
                }
            };
            SMouse.start();
            Game.PrintChat("Royal Ziggs loaded!");
        }
Пример #8
0
        /// <summary>
        /// Comboing
        /// </summary>
        static void Combo()
        {
            Console.WriteLine("Combo");
            bool        useQ    = Q1.IsReady() && menu.SubMenu("combo").Item("UseQ").GetValue <bool>();
            bool        useW    = W.IsReady() && menu.SubMenu("combo").Item("UseW").GetValue <bool>();
            bool        useE    = E.IsReady() && menu.SubMenu("combo").Item("UseE").GetValue <bool>();
            bool        useR    = R.IsReady() && (menu.SubMenu("combo").Item("UseR").GetValue <bool>() || menu.SubMenu("ulti").Item("forceR").GetValue <KeyBind>().Active);
            Obj_AI_Hero targetQ = TargetSelector.GetTarget(Q3.Range, TargetSelector.DamageType.Magical);
            Obj_AI_Hero targetW = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);
            Obj_AI_Hero targetE = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
            Obj_AI_Hero targetR = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (targetW.IsValid && CalculateDamage(targetW) > targetW.Health)
            {
                if (IgniteSlot != SpellSlot.Unknown && player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready && menu.Item("UseIgnite").GetValue <bool>())
                {
                    player.Spellbook.CastSpell(IgniteSlot, targetW);
                }
                SMouse.addMouseEvent(targetW.Position, false, CRB);

                /*
                 *              if(DFG.IsReady())
                 *  DFG.Cast(targetW);*/
            }

            if (useW)
            {
                PredictionOutput prediction = W.GetPrediction(targetW);
                if (menu.SubMenu("misc").Item("GETOVERHERE").GetValue <bool>() && (prediction.Hitchance >= HitChance.Medium))
                {
                    Vector3 pos = V3E(player.Position, prediction.CastPosition, Vector3.Distance(player.Position, prediction.CastPosition) + 30);
                    if (Vector3.Distance(player.Position, prediction.CastPosition) >=
                        Vector3.Distance(player.Position, targetW.Position))
                    {
                        W.Cast(pos);
                        SMouse.addMouseEvent(pos, false, CRB);
                        Wmode = WModes.COMBAT;
                    }
                    else
                    {
                        //pos = V3E(player.Position, prediction.CastPosition, Vector3.Distance(player.Position, prediction.CastPosition));
                        W.Cast(targetW.Position);
                        SMouse.addMouseEvent(targetW.Position, false, CRB);
                        Wmode = WModes.COMBAT;
                    }
                }
                else
                {
                    Vector3 pos = V3E(player.Position, targetW.Position, Vector3.Distance(player.Position, prediction.CastPosition) - 10);
                    W.Cast(pos);
                    SMouse.addMouseEvent(pos, false, CRB);
                    Wmode = WModes.COMBAT;
                }
            }
            if (useQ)
            {
                CastQ(targetQ);
                SMouse.addMouseEvent(V3E(player.Position, targetQ.Position, Vector3.Distance(player.Position, targetQ.Position) * 0.5f), false, CRB);
            }
            if (useE)
            {
                PredictionOutput prediction = E.GetPrediction(targetE);
                Vector3          pos        = V3E(player.Position, prediction.CastPosition,
                                                  Vector3.Distance(player.Position, prediction.CastPosition) + 30);
                if (prediction.Hitchance >= HitChance.Medium)
                {
                    E.Cast(pos);
                    SMouse.addMouseEvent(pos, false, CRB);
                }
            }
            if (useR)//TEST IT!
            {
                //Honda's way to predict ulti
                R.Delay = 1900 + 1500 * targetR.Distance(player.Position) / 5300;
                PredictionOutput prediction = R.GetPrediction(targetR);
                if ((menu.SubMenu("ulti").Item("ultiOnKillable").GetValue <bool>() && (player.GetSpellDamage(targetR, SpellSlot.R, 0) > targetR.Health && !(CalculateDamage(targetR, true) > targetR.Health) && Vector3.Distance(player.Position, targetR.Position) < W.Range && lastQ + 3 < Game.Time) || menu.SubMenu("ulti").Item("forceR").GetValue <KeyBind>().Active))
                {
                    if (prediction.Hitchance >= HitChance.Medium || menu.SubMenu("ulti").Item("forceRPrediction").GetValue <bool>())
                    {
                        R.Cast(prediction.CastPosition);
                        SMouse.addMouseEvent(prediction.CastPosition, false, CRB);
                    }
                }

                if (!menu.SubMenu("ulti").Item("AOE").GetValue <bool>())
                {
                    return;
                }
                {
                    if (R.CastIfWillHit(targetR, menu.SubMenu("ulti").Item("enemiesToHit").GetValue <Slider>().Value))
                    {
                        SMouse.addMouseEvent(targetR.Position, false, CRB);
                    }
                }
            }
        }