Esempio n. 1
0
 public override void castWhenNear(JungleCamp camp)
 {
     if (JungleClearer.focusedCamp != null && E.IsReady())
     {
         float dist = player.Distance(JungleClearer.focusedCamp.Position);
         if (dist < E.Range * 0.8f && dist >200)
         {
             E.Cast(camp.Position);
         }
     }
 }
Esempio n. 2
0
 public override void castWhenNear(JungleCamp camp)
 {
     if (JungleClearer.focusedCamp != null && Q.IsReady())
     {
         if (Q.Instance.Name == "BlindMonkQOne")
         {
             float dist = player.Distance(JungleClearer.focusedCamp.Position);
             if (dist < Q.Range*0.9f && dist > 200)
             {
                 Q.Cast(camp.Position);
             }
         }
         else
         {
             Q.Cast();
         }
     }
 }
Esempio n. 3
0
        public static bool isInBuffWay(JungleCamp camp)
        {
            JungleCamp bestBuff = getBestBuffCamp();

            if (bestBuff == null)
            {
                return(false);
            }
            float distTobuff     = bestBuff.Position.Distance(HypaJungle.player.Position, true);
            float distToCamp     = camp.Position.Distance(HypaJungle.player.Position, true);
            float distCampToBuff = camp.Position.Distance(bestBuff.Position, true);

            if (distTobuff > distToCamp + 800 && distTobuff > distCampToBuff)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 4
0
        public JungleCamp getBestCampToGo()
        {
            float      lessDist = float.MaxValue;
            JungleCamp bestCamp = null;

            foreach (var jungleCamp in _jungleCamps)
            {
                var   distTillCamp  = getPathLenght(HypaJungle.player.GetPath(jungleCamp.Position));
                var   timeToCamp    = distTillCamp / HypaJungle.player.MoveSpeed;
                float timeTillSpawn = Game.Time - jungleCamp.ClearTick;
                Console.WriteLine(jungleCamp.ClearTick + " : " + Game.Time);
                if (timeTillSpawn + timeToCamp > jungleCamp.RespawnTimer.TotalSeconds && lessDist > distTillCamp)
                {
                    lessDist = distTillCamp;
                    bestCamp = jungleCamp;
                }
            }
            return(bestCamp);
        }
Esempio n. 5
0
        /*
         *  is buff +5
         *  is in way of needed buff +5
         *  is close priority +10 +8 +6
         *  is spawning till get + 5 sec +4
         *  if smite ebtter get to buff then other camps
         *
         */

        public static JungleCamp getBestCampToGo()
        {
            int        minPriority = getPriorityNumber(HypaJungle.jTimer._jungleCamps.First());
            JungleCamp bestCamp    = null;

            foreach (var jungleCamp in HypaJungle.jTimer._jungleCamps)
            {
                if (skipCamp != null && skipCamp.campId == jungleCamp.campId)
                {
                    continue;
                }
                int piro = getPriorityNumber(jungleCamp);
                if (minPriority > piro)
                {
                    bestCamp    = jungleCamp;
                    minPriority = piro;
                }
            }
            skipCamp = null;
            return(bestCamp);
        }
Esempio n. 6
0
        public bool canKill(JungleCamp camp,float timeTo)
        {
            if (dpsFix == 0 || camp.dps == 0)
                return true;

            float realDps = dpsFix + bonusItemDps;
            float bonusDmg = 0;
            float aproxSecTK = (camp.health - bonusDmg) / realDps;

            float secTillIDie = (player.Health + canHeal(timeTo, aproxSecTK)) / (camp.dps * 0.8f * damageTaken*(100+player.Level*3)/100);
            if (smiteSpell.IsReady((int) (secTillIDie + timeTo)*1000))
            {
                bonusDmg += getSmiteDmg();
            }

            float secToKill = (camp.health - bonusDmg) / realDps;
            if (secToKill*1.1f > secTillIDie)
                return false;
            return true;
        }
Esempio n. 7
0
        public static void updateJungleCleaner()
        {
            if (player.IsDead)
            {
                jcState = JungleCleanState.RecallForHeal;
                return;
            }

            if (jcState == JungleCleanState.SearchingBestCamp)
            {
                focusedCamp = getBestCampToGo();
                if (focusedCamp != null)
                {
                    //puss out or kill?
                    if (focusedCamp.willKillMe  || (player.Health/player.MaxHealth <0.5f && focusedCamp.timeToCamp>12))
                    {
                        Console.WriteLine("gona diee");
                        jcState = JungleCleanState.RecallForHeal;
                    }
                    else
                    {
                        jcState = JungleCleanState.RunningToCamp;
                    }
                }
                else
                {
                    jcState = JungleCleanState.RecallForHeal;
                }
            }

            if (jcState == JungleCleanState.RunningToCamp)
            {
                if (focusedCamp.State != JungleCampState.Dead && focusedCamp.team != 3)
                    jungler.castWhenNear(focusedCamp);
                jungler.checkItems();
                logicRunToCamp();
            }

            if (jcState == JungleCleanState.RunningToCamp && (HypaJungle.player.Position.Distance(focusedCamp.Position) < 200 || isCampVisible()))
            {
                jcState = JungleCleanState.WaitingMinions;
            }

            if (jcState == JungleCleanState.WaitingMinions)
            {
                doWhileIdling();
            }

            if (jcState == JungleCleanState.WaitingMinions && (isCampVisible()))
            {
                jcState = JungleCleanState.AttackingMinions;
            }

            if (jcState == JungleCleanState.AttackingMinions)
            {
                attackCampMinions();
            }

            if (jcState == JungleCleanState.AttackingMinions && isCampFinished())
            {
                if(HypaJungle.Config.Item("autoBuy").GetValue<bool>())
                    jcState = JungleCleanState.GoingToShop;
                else
                    jcState = JungleCleanState.SearchingBestCamp;
            }

            if (jcState == JungleCleanState.ThinkAfterFinishCamp)
            {
                jcState = JungleCleanState.SearchingBestCamp;

            }

            if (jcState == JungleCleanState.RecallForHeal)
            {
                if (jungler.recall.IsReady() && !player.IsChanneling && !jungler.inSpwan() && !recalCasted)
                {
                    jungler.recall.Cast();
                    recalCasted = true;
                }

                if (jungler.inSpwan())
                {
                    if (HypaJungle.Config.Item("autoBuy").GetValue<bool>())
                    {
                        jcState = JungleCleanState.GoingToShop;
                    }
                    else
                    {
                        if (jungler.inSpwan() && player.Health > player.MaxHealth * 0.7f && (!jungler.gotMana || player.Mana > player.MaxMana * 0.7f))
                            jcState = JungleCleanState.SearchingBestCamp;
                    }
                }

            }

            if (jcState == JungleCleanState.GoingToShop)
            {
                if (!HypaJungle.Config.Item("autoBuy").GetValue<bool>())
                    jcState = JungleCleanState.SearchingBestCamp;

                if (jungler.inSpwan())
                {
                    jungler.getItemPassiveBoostDps();
                    jungler.setupSmite();
                }

                if (jungler.inSpwan() && player.IsChanneling)
                {
                    Vector3 stopRecPos = new Vector3(6, 30, 2);
                    player.IssueOrder(GameObjectOrder.MoveTo, player.Position + stopRecPos);
                }

                if (jungler.nextItem != null && player.GoldCurrent >= jungler.nextItem.goldReach )
                {
                    if (jungler.recall.IsReady() && !player.IsChanneling && !jungler.inSpwan() && !recalCasted)
                    {
                        jungler.recall.Cast();
                        recalCasted = true;
                    }
                }
                else
                {
                    if (jungler.inSpwan() && player.Health > player.MaxHealth * 0.8f && (!jungler.gotMana || player.Mana > player.MaxMana * 0.8f))
                        jcState = JungleCleanState.SearchingBestCamp;
                    if(!player.IsChanneling && !jungler.inSpwan())
                        jcState = JungleCleanState.SearchingBestCamp;

                }
            }
            else if (jcState != JungleCleanState.RecallForHeal)
            {
                recalCasted = false;
            }

            if (jcState == JungleCleanState.GoingToShop && jungler.inSpwan())
            {
                if (jungler.nextItem != null && player.GoldCurrent >= jungler.nextItem.goldReach )
                    jungler.buyItems();
                if (player.Health > player.MaxHealth * 0.75f && player.Mana > player.MaxMana * 0.75f)
                    jcState = JungleCleanState.SearchingBestCamp;
            }
        }
Esempio n. 8
0
        public static void updateJungleCleaner()
        {
            if (player.IsDead)
            {
                jcState = JungleCleanState.RecallForHeal;
                return;
            }

            if (jcState == JungleCleanState.SearchingBestCamp)
            {
                focusedCamp = getBestCampToGo();
                if (focusedCamp != null)
                {
                    //puss out or kill?
                    if (focusedCamp.willKillMe || (player.Health / player.MaxHealth < 0.5f && focusedCamp.timeToCamp > 12))
                    {
                        Console.WriteLine("gona diee");
                        jcState = JungleCleanState.RecallForHeal;
                    }
                    else
                    {
                        jcState = JungleCleanState.RunningToCamp;
                    }
                }
                else
                {
                    jcState = JungleCleanState.RecallForHeal;
                }
            }

            if (jcState == JungleCleanState.RunningToCamp)
            {
                if (focusedCamp.State != JungleCampState.Dead && focusedCamp.team != 3)
                {
                    jungler.castWhenNear(focusedCamp);
                }
                jungler.checkItems();
                logicRunToCamp();
            }

            if (jcState == JungleCleanState.RunningToCamp && (HypaJungle.player.Position.Distance(focusedCamp.Position) < 200 || isCampVisible()))
            {
                jcState = JungleCleanState.WaitingMinions;
            }

            if (jcState == JungleCleanState.WaitingMinions)
            {
                doWhileIdling();
            }

            if (jcState == JungleCleanState.WaitingMinions && (isCampVisible()))
            {
                jcState = JungleCleanState.AttackingMinions;
            }

            if (jcState == JungleCleanState.AttackingMinions)
            {
                attackCampMinions();
            }

            if (jcState == JungleCleanState.AttackingMinions && isCampFinished())
            {
                if (HypaJungle.Config.Item("autoBuy").GetValue <bool>())
                {
                    jcState = JungleCleanState.GoingToShop;
                }
                else
                {
                    jcState = JungleCleanState.SearchingBestCamp;
                }
            }

            if (jcState == JungleCleanState.ThinkAfterFinishCamp)
            {
                jcState = JungleCleanState.SearchingBestCamp;
            }

            if (jcState == JungleCleanState.RecallForHeal)
            {
                if (jungler.recall.IsReady() && !player.IsChanneling && !jungler.inSpwan() && !recalCasted)
                {
                    jungler.recall.Cast();
                    recalCasted = true;
                }

                if (jungler.inSpwan())
                {
                    if (HypaJungle.Config.Item("autoBuy").GetValue <bool>())
                    {
                        jcState = JungleCleanState.GoingToShop;
                    }
                    else
                    {
                        if (jungler.inSpwan() && player.Health > player.MaxHealth * 0.7f && (!jungler.gotMana || player.Mana > player.MaxMana * 0.7f))
                        {
                            jcState = JungleCleanState.SearchingBestCamp;
                        }
                    }
                }
            }

            if (jcState == JungleCleanState.GoingToShop)
            {
                if (!HypaJungle.Config.Item("autoBuy").GetValue <bool>())
                {
                    jcState = JungleCleanState.SearchingBestCamp;
                }

                if (jungler.inSpwan())
                {
                    jungler.getItemPassiveBoostDps();
                    jungler.setupSmite();
                }

                if (jungler.inSpwan() && player.IsChanneling)
                {
                    Vector3 stopRecPos = new Vector3(6, 30, 2);
                    player.IssueOrder(GameObjectOrder.MoveTo, player.Position + stopRecPos);
                }

                if (jungler.nextItem != null && player.GoldCurrent >= jungler.nextItem.goldReach)
                {
                    if (jungler.recall.IsReady() && !player.IsChanneling && !jungler.inSpwan() && !recalCasted)
                    {
                        jungler.recall.Cast();
                        recalCasted = true;
                    }
                }
                else
                {
                    if (jungler.inSpwan() && player.Health > player.MaxHealth * 0.8f && (!jungler.gotMana || player.Mana > player.MaxMana * 0.8f))
                    {
                        jcState = JungleCleanState.SearchingBestCamp;
                    }
                    if (!player.IsChanneling && !jungler.inSpwan())
                    {
                        jcState = JungleCleanState.SearchingBestCamp;
                    }
                }
            }
            else if (jcState != JungleCleanState.RecallForHeal)
            {
                recalCasted = false;
            }

            if (jcState == JungleCleanState.GoingToShop && jungler.inSpwan())
            {
                if (jungler.nextItem != null && player.GoldCurrent >= jungler.nextItem.goldReach)
                {
                    jungler.buyItems();
                }
                if (player.Health > player.MaxHealth * 0.75f && player.Mana > player.MaxMana * 0.75f)
                {
                    jcState = JungleCleanState.SearchingBestCamp;
                }
            }
        }
Esempio n. 9
0
        public static int getPriorityNumber(JungleCamp camp)
        {
            if (camp.isDragBaron)
                return 999;

            if (((camp.team == 0 && HypaJungle.player.Team == GameObjectTeam.Chaos)
                || (camp.team == 1 && HypaJungle.player.Team == GameObjectTeam.Order)) && !HypaJungle.Config.Item("enemyJung").GetValue<bool>())
                return 999;

            if (camp.team == 3 && !HypaJungle.Config.Item("doCrabs").GetValue<bool>())
                return 999;

            int priority = 0;

            var distTillCamp = getPathLenght(HypaJungle.player.GetPath(camp.Position));
            var timeToCamp = distTillCamp / HypaJungle.player.MoveSpeed;
            var spawnTime = (Game.Time < camp.SpawnTime.TotalSeconds) ? camp.SpawnTime.TotalSeconds : camp.RespawnTimer.TotalSeconds;

            float revOn = camp.ClearTick + (float)spawnTime;
            float timeTillSpawn = (camp.State == JungleCampState.Dead)?((revOn - Game.Time > 0) ? (revOn - Game.Time) : 0):0;

            camp.willKillMe = false;
            if (!jungler.canKill(camp, timeToCamp) && HypaJungle.Config.Item("checkKillability").GetValue<bool>())
            {
                priority += 999;
                camp.willKillMe = true;
            }
            priority -= camp.bonusPrio;
            priority += (int)timeToCamp;
            priority += (int) timeTillSpawn;
            priority -= (camp.isBuff) ? jungler.buffPriority : 0;
            //priority -= (int)(timeTillSpawn - timeToCamp);
            //alive on come is better ;)
            //Priority focus!!
            if (player.Level <= 3)
            {
                if ((camp.campId == 10 || camp.campId == 4) & jungler.startCamp == Jungler.StartCamp.Red)
                    priority -= 5;
                if ((camp.campId == 1 || camp.campId == 7) & jungler.startCamp == Jungler.StartCamp.Blue)
                    priority -= 5;
                if ((camp.campId == 11 || camp.campId == 5) & jungler.startCamp == Jungler.StartCamp.Golems)
                    priority -= 5;
                if ((camp.campId == 14 || camp.campId == 13) & jungler.startCamp == Jungler.StartCamp.Frog)
                    priority -= 5;
            }

            camp.priority = priority;
            camp.timeToCamp = timeToCamp;

            //if(!camp.isBuff)
              //  priority -= (isInBuffWay(camp)) ? 10 : 0;

            return priority;
        }
Esempio n. 10
0
 public static bool isInBuffWay(JungleCamp camp)
 {
     JungleCamp bestBuff = getBestBuffCamp();
     if (bestBuff == null)
         return false;
     float distTobuff = bestBuff.Position.Distance(HypaJungle.player.Position,true);
     float distToCamp = camp.Position.Distance(HypaJungle.player.Position,true);
     float distCampToBuff = camp.Position.Distance(bestBuff.Position,true);
     if (distTobuff > distToCamp + 800 && distTobuff > distCampToBuff)
         return true;
     return false;
 }
Esempio n. 11
0
 public abstract void castWhenNear(JungleCamp camp);
Esempio n. 12
0
 /*
  *  is buff +5
  *  is in way of needed buff +5
  *  is close priority +10 +8 +6
  *  is spawning till get + 5 sec +4
  *  if smite ebtter get to buff then other camps
  *
  */
 public static JungleCamp getBestCampToGo()
 {
     int minPriority = getPriorityNumber(HypaJungle.jTimer._jungleCamps.First());
     JungleCamp bestCamp = null;
     foreach (var jungleCamp in HypaJungle.jTimer._jungleCamps)
     {
         if(skipCamp != null && skipCamp.campId == jungleCamp.campId)
             continue;
         int piro = getPriorityNumber(jungleCamp);
         if (minPriority > piro)
         {
             bestCamp = jungleCamp;
             minPriority = piro;
         }
     }
     skipCamp = null;
     return bestCamp;
 }
Esempio n. 13
0
        public bool canKill(JungleCamp camp,float timeTo)
        {
            if (dpsFix == 0 || camp.dps == 0)
                return true;

            float realDps = dpsFix + bonusItemDps;
            float bonusDmg = 0;
            float aproxSecTK = (camp.health - bonusDmg) / realDps;

            float secTillIDie = (player.Health + canHeal(timeTo, aproxSecTK)) / (camp.dps * 0.8f * damageTaken*(100+player.Level*3)/100);
            if (smiteSpell.IsReady((int) (secTillIDie + timeTo)*1000))
            {
                bonusDmg += new float[]
                {390, 410, 430, 450, 480, 510, 540, 570, 600, 640, 680, 720, 760, 800, 850, 900, 950, 1000}[
                    player.Level - 1];
            }

            float secToKill = (camp.health - bonusDmg) / realDps;
            if (secToKill*1.1f > secTillIDie)
                return false;
            return true;
        }
Esempio n. 14
0
        public static int getPriorityNumber(JungleCamp camp)
        {
            if (camp.isDragBaron)
            {
                return(999);
            }

            if (((camp.team == 0 && HypaJungle.player.Team == GameObjectTeam.Chaos) ||
                 (camp.team == 1 && HypaJungle.player.Team == GameObjectTeam.Order)) && !HypaJungle.Config.Item("enemyJung").GetValue <bool>())
            {
                return(999);
            }

            if (camp.team == 3 && !HypaJungle.Config.Item("doCrabs").GetValue <bool>())
            {
                return(999);
            }

            int priority = 0;

            var distTillCamp = getPathLenght(HypaJungle.player.GetPath(camp.Position));
            var timeToCamp   = distTillCamp / HypaJungle.player.MoveSpeed;
            var spawnTime    = (Game.Time < camp.SpawnTime.TotalSeconds) ? camp.SpawnTime.TotalSeconds : camp.RespawnTimer.TotalSeconds;

            float revOn         = camp.ClearTick + (float)spawnTime;
            float timeTillSpawn = (camp.State == JungleCampState.Dead)?((revOn - Game.Time > 0) ? (revOn - Game.Time) : 0):0;

            camp.willKillMe = false;
            if (!jungler.canKill(camp, timeToCamp) && HypaJungle.Config.Item("checkKillability").GetValue <bool>())
            {
                priority       += 999;
                camp.willKillMe = true;
            }
            priority -= camp.bonusPrio;
            priority += (int)timeToCamp;
            priority += (int)timeTillSpawn;
            priority -= (camp.isBuff) ? jungler.buffPriority : 0;
            //priority -= (int)(timeTillSpawn - timeToCamp);
            //alive on come is better ;)
            //Priority focus!!
            if (player.Level <= 3)
            {
                if ((camp.campId == 10 || camp.campId == 4) & jungler.startCamp == Jungler.StartCamp.Red)
                {
                    priority -= 5;
                }
                if ((camp.campId == 1 || camp.campId == 7) & jungler.startCamp == Jungler.StartCamp.Blue)
                {
                    priority -= 5;
                }
                if ((camp.campId == 11 || camp.campId == 5) & jungler.startCamp == Jungler.StartCamp.Golems)
                {
                    priority -= 5;
                }
                if ((camp.campId == 14 || camp.campId == 13) & jungler.startCamp == Jungler.StartCamp.Frog)
                {
                    priority -= 5;
                }
            }


            camp.priority   = priority;
            camp.timeToCamp = timeToCamp;

            //if(!camp.isBuff)
            //  priority -= (isInBuffWay(camp)) ? 10 : 0;

            return(priority);
        }
Esempio n. 15
0
 public override void castWhenNear(JungleCamp camp)
 {
 }
Esempio n. 16
0
 public override void castWhenNear(JungleCamp camp)
 {
 }
Esempio n. 17
0
 public abstract void castWhenNear(JungleCamp camp);