Пример #1
0
 static void GO_OnRemove(LeagueSharp.GameObject GO, EventArgs args)
 {
     if (GO.Name == wObj)
     {
         wPos  = default(Vector3);
         Wmode = WModes.NONE;
     }
 }
Пример #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
 private 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: разные интеррапты для лисинов\джарванов\леон
         //else//Проверить работоспособность на разных гепклозерах
         // W.Cast(gapcloser.End);//СДЕЛАТЬ, БЛЯДЬ!
         Wmode = WModes.ANTIGAPCLOSER;
     }
 }
Пример #4
0
 /// <summary>
 /// Interruptor
 /// </summary>
 /// <param name="unit">Unit that causing interruptable spell</param>
 /// <param name="spell">Spell that can be interrupted</param>
 private static void Interrupter_OnPossibleToInterrupt(Obj_AI_Base unit, InterruptableSpell spell)
 {
     if (W.IsReady() &&
         Vector3.Distance(player.Position, unit.Position) <= -1 + W.Range + W.Width / 2 &&
         menu.SubMenu("misc").Item("interrupt").GetValue <bool>() &&
         spell.DangerLevel >= InterruptableDangerLevel.Medium)
     {
         Vector3 pos = V3E(player.Position, unit.Position, -1 + Vector3.Distance(player.Position, unit.Position) - W.Width / 2);
         W.Cast(pos, true);
         Wmode = WModes.INTERRUPTOR;
     }
 }
Пример #5
0
        private 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)
                    Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(pass.X, pass.Y)).Send();
                }
                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)
                        Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(pass.X, pass.Y)).Send(); //Move closer to the wall
                        return;
                    }
                    else     //Yes! We can!
                    {        //Stand still
                        Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(player.Position.X, player.Position.Y)).Send();
                    }
                }
                if (!W.IsReady())
                {
                    return;            //Simple!
                }
                W.Cast(pos);           //Poof! W cast!
                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);
                Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(escapePos.X, escapePos.Y)).Send(); //Move away
                if (!W.IsReady())
                {
                    return;            //Simple!
                }
                W.Cast(WPos);          //Cast W to move away
                //TUnit_obj.isAggred = false;//Turrent isn't focusing us anymore
                Wmode = WModes.ESCAPE; //???PROFIT
            }
            break;
            }
        }
Пример #6
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;
     }
 }
Пример #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);
                    }
                }
            }
        }
Пример #9
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;
     }
 }
Пример #10
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;
     }
 }
Пример #11
0
 static void GO_OnRemove(LeagueSharp.GameObject GO, EventArgs args)
 {
     if (GO.Name == wObj)
     {
         wPos = default(Vector3);
         Wmode = WModes.NONE;
     }
 }
Пример #12
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!");
        }
Пример #13
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;
     }
 }
Пример #14
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);
                }
            }
        }
Пример #15
0
        /// <summary>
        /// OnGameLoad callback. Executes on loading game
        /// </summary>
        /// <param name="args"></param>
        private static void Game_OnGameLoad(EventArgs args)
        {
            if (player.ChampionName != champName)
            {
                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"));

            if (ignite != null && ignite.Slot != SpellSlot.Unknown)
            {
                DOTReady    = true;
                igniteCheck = true;
                mainCombo.Add(Tuple.Create(player.GetSpellSlot("SummonerDot"), 0));
            }
            //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.OnGameUpdate += Game_OnGameUpdate;
            Drawing.OnDraw    += Drawing_OnDraw;
            AntiGapcloser.OnEnemyGapcloser    += AntiGapcloser_OnEnemyGapcloser;
            Interrupter.OnPossibleToInterrupt += Interrupter_OnPossibleToInterrupt;
            GameObject.OnCreate      += GO_OnCreate;
            GameObject.OnDelete      += GO_OnRemove;
            Game.OnGameProcessPacket += OnRecievePacket;
            Console.WriteLine("Loaded!");
        }
Пример #16
0
        /// <summary>
        /// Comboing
        /// </summary>
        private 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 = SimpleTs.GetTarget(Q3.Range, SimpleTs.DamageType.Magical);
            Obj_AI_Hero targetW = SimpleTs.GetTarget(W.Range, SimpleTs.DamageType.Magical);
            Obj_AI_Hero targetE = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Magical);
            Obj_AI_Hero targetR = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Magical);

            if (targetW.IsValid && CalculateDamage(targetW) > targetW.Health)
            {
                if (igniteCheck)
                {
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), targetW);
                }
                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, pos))
                    {
                        W.Cast(pos);
                        Wmode = WModes.COMBAT;
                    }
                    else
                    {
                        pos = V3E(player.Position, prediction.CastPosition,
                                  Vector3.Distance(player.Position, prediction.CastPosition));
                        W.Cast(pos);
                        Wmode = WModes.COMBAT;
                    }
                }
                else
                {
                    W.Cast(V3E(player.Position, targetW.Position, -10));
                    Wmode = WModes.COMBAT;
                }
            }
            if (useQ)
            {
                CastQ(targetQ);
            }
            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);
                }
            }
            if (useR)//TEST IT!
            {
                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) && targetR.Distance(player) < 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);
                    }
                }
                if (!menu.SubMenu("ulti").Item("AOE").GetValue <bool>())
                {
                    return;
                }
                List <Vector2> enemiesPrediction = new List <Vector2>();
                foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>())
                {
                    if (hero.Team != player.Team && hero.IsTargetable)
                    {
                        enemiesPrediction.Add(R.GetPrediction(hero).CastPosition.To2D());
                    }
                }
                MinionManager.FarmLocation predictableCastPosition = R.GetCircularFarmLocation(enemiesPrediction);
                if (predictableCastPosition.MinionsHit >= menu.SubMenu("ulti").Item("enemiesToHit").GetValue <Slider>().Value)
                {
                    R.Cast(predictableCastPosition.Position);
                }
            }
        }