コード例 #1
0
        public static void Execute()
        {
            if (LastRun > Environment.TickCount)
            {
                return;
            }

            if (!Player.Instance.IsInShopRange() &&
                Player.Instance.CountAlliesInRange(Misc.RangeEnemy) >= Misc.EnemyCount &&
                Activator.lastUsed > Environment.TickCount)
            {
                if (Settings.UseHPpot && HealthPotion.IsOwned())
                {
                    if (Player.Instance.HealthPercent < Settings.MinHPpot && !Player.Instance.HasBuff("RegenerationPotion"))
                    {
                        HealthPotion.Cast();
                    }
                }

                if (Settings.UseBiscuits && Biscuit.IsOwned())
                {
                    if (Player.Instance.ManaPercent <= Settings.MinBiscuitMp && Player.Instance.HealthPercent <= Settings.MinBiscuitHp && !Player.Instance.HasBuff("ItemMiniRegenPotion"))
                    {
                        Biscuit.Cast();
                    }
                }

                if (Settings.UseRefillPOT && RefilablePotion.IsOwned())
                {
                    if (Player.Instance.HealthPercent <= Settings.MinRefillHp && !Player.Instance.HasBuff("ItemCrystalFlask"))
                    {
                        RefilablePotion.Cast();
                    }
                }

                if (Settings.UseCorrupts && CorruptingPotion.IsOwned())
                {
                    if (Player.Instance.ManaPercent < Settings.MinCorruptMp && Player.Instance.HealthPercent < Settings.MinCorruptHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                    {
                        CorruptingPotion.Cast();
                    }
                }

                if (Settings.UseHunters && HuntersPotion.IsOwned())
                {
                    if (Player.Instance.ManaPercent < Settings.MinHunterMp && Player.Instance.HealthPercent < Settings.MinHunterHp && !Player.Instance.HasBuff("ItemCrystalFlaskJungle"))
                    {
                        HuntersPotion.Cast();
                    }
                }

                LastRun = Environment.TickCount + 1000;
            }
        }
コード例 #2
0
            private static void Potions()
            {
                if (ObjectManager.GetLocalPlayer().IsDead || ObjectManager.GetLocalPlayer().IsInFountainRange() ||
                    ObjectManager.GetLocalPlayer().HasBuff("recall"))
                {
                    return;
                }

                if (!AutoPotionsMenu["SharpShooter.UtilityMenu.AutoPotionsMenu.Enabled"].Enabled ||
                    ObjectManager.GetLocalPlayer().HealthPercent() > AutoPotionsMenu["SharpShooter.UtilityMenu.AutoPotionsMenu.MyHp"].Value ||
                    ObjectManager.GetLocalPlayer().CountEnemyHeroesInRange(1200) <= 0)
                {
                    return;
                }

                if (ObjectManager.GetLocalPlayer().Buffs.Any(x => x != null && buffName.Contains(x.Name.ToLower()) && x.IsActive))
                {
                    return;
                }

                if (HealthPotion != null && HealthPotion.IsMine && HealthPotion.Ready)
                {
                    HealthPotion.Cast();
                }
                else if (TotalBiscuitofRejuvenation != null && TotalBiscuitofRejuvenation.IsMine && TotalBiscuitofRejuvenation.Ready)
                {
                    TotalBiscuitofRejuvenation.Cast();
                }
                else if (RefillablePotion != null && RefillablePotion.IsMine && RefillablePotion.Ready)
                {
                    RefillablePotion.Cast();
                }
                else if (HuntersPotion != null && HuntersPotion.IsMine && HuntersPotion.Ready)
                {
                    HuntersPotion.Cast();
                }
                else if (CorruptingPotion != null && CorruptingPotion.IsMine && CorruptingPotion.Ready)
                {
                    CorruptingPotion.Cast();
                }
            }
コード例 #3
0
ファイル: Program.cs プロジェクト: krisfiction/TrialByCombat
        public static void StartGame(Player player, Monster monster)
        {
            //Monster monster = new Monster();
            // monster.GetMonster();
            Generate.Monster(monster);


            Console.WriteLine("You see a " + monster.Name);

            Console.WriteLine();



            //          Combat combat = new Combat();



            while (0 < monster.Health)
            {
                StatBar.DisplayStatBar(player, monster);

                //move to seperate method Combat.Menu() ??
                Console.WriteLine("Combat Menu:");
                Console.WriteLine("a) Attack");
                Console.WriteLine("h) 60% Heal Potion\t\t\t" + HealthPotion.Quantity + " available");
                Console.WriteLine("s) Magic Shield Scroll (50 points)\t" + Scroll.MagicShieldScrollCount + " available");
                Console.WriteLine("d) Death Scroll (Instant Kill)\t\t" + Scroll.DeathScrollCount + " available");
                Console.WriteLine();
                Console.WriteLine("c) Character Sheet");
                Console.WriteLine("i) Inventory");


                ConsoleKey aInput = Console.ReadKey().Key;
                if (aInput == ConsoleKey.Escape)
                {
                    Console.WriteLine("x"); //Escape key seems to delete the first character of the next line
                    Console.WriteLine("are you sure you want to Quit playing? (press Y for yes");

                    ConsoleKey bInput = Console.ReadKey().Key;
                    if (bInput == ConsoleKey.Y)
                    {
                        Environment.Exit(0);
                    }
                }
                if (aInput == ConsoleKey.A)
                {
                    Combat.Start(player, monster);
                }
                if (aInput == ConsoleKey.H)
                {
                    HealthPotion.Cast(player);
                }
                if (aInput == ConsoleKey.S)
                {
                    Scroll.MagicShield(player);
                    Combat.MonsterAttack(player, monster); // attack of opportunity ??
                }
                if (aInput == ConsoleKey.C)
                {
                    CharacterSheet.Display(player);
                }
                if (aInput == ConsoleKey.D)
                {
                    Scroll.Death(monster);
                    Combat.MonsterAttack(player, monster); // attack of opportunity ?? - may need removed - monster should be dead so it is redundant
                }
                if (aInput == ConsoleKey.I)
                {
                    Inventory.Display(player);
                }
            }

            Console.WriteLine("you have slain the " + monster.Name);
            Loot.Roll(player, monster);
            //Generate.Armor();
        }
コード例 #4
0
ファイル: Consumables.cs プロジェクト: Rafiters25/Schzneger-
        public static void Execute()
        {
            if (LastRun > Environment.TickCount)
            {
                return;
            }

            var target = EntityManager.Heroes.Enemies.FirstOrDefault(e => !e.IsDead && e.IsInRange(Player.Instance, 1000));

            if (Player.Instance.IsRecalling() || Player.Instance.IsInShopRange() || target == null)
            {
                return;
            }

            if (Settings.UseHPpot && HealthPotion.IsOwned())
            {
                if (Player.Instance.HealthPercent <= Settings.MinHPpot && !Player.Instance.HasBuff("RegenerationPotion"))
                {
                    HealthPotion.Cast();
                }
            }

            if (Settings.UseBiscuits && Biscuit.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinBiscuitMp && Player.Instance.HealthPercent <= Settings.MinBiscuitHp && !Player.Instance.HasBuff("ItemMiniRegenPotion"))
                {
                    Biscuit.Cast();
                }
            }

            if (Settings.UseRefillPOT && RefilablePotion.IsOwned())
            {
                if (Player.Instance.HealthPercent <= Settings.MinRefillHp && !Player.Instance.HasBuff("ItemCrystalFlask"))
                {
                    RefilablePotion.Cast();
                }
            }

            if (Settings.UseCorrupts && CorruptingPotion.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinCorruptMp && Player.Instance.HealthPercent <= Settings.MinCorruptHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                {
                    CorruptingPotion.Cast();
                }
            }

            if (Settings.UseCorrupts && CorruptingPotion.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinCorruptMp && Player.Instance.HealthPercent <= Settings.MinCorruptHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                {
                    CorruptingPotion.Cast();
                }
            }

            if (Settings.UseHunters && HuntersPotion.IsOwned())
            {
                if (Player.Instance.ManaPercent <= Settings.MinHunterMp && Player.Instance.HealthPercent <= Settings.MinHunterHp && !Player.Instance.HasBuff("ItemDarkCrystalFlask"))
                {
                    HuntersPotion.Cast();
                }

                if (Settings.UseHuntersMinionWillDie)
                {
                    var BigJGMinion =
                        EntityManager.MinionsAndMonsters.GetJungleMonsters()
                        .FirstOrDefault(
                            m =>
                            m.BaseSkinName == "SRU_Baron" || m.BaseSkinName == "SRU_Dragon" ||
                            m.BaseSkinName == "SRU_Blue" || m.BaseSkinName == "SRU_Red" ||
                            m.BaseSkinName == "Sru_Crab" || m.BaseSkinName == "SRU_Gromp" ||
                            m.BaseSkinName == "SRU_Murkwolf" || m.BaseSkinName == "SRU_Krug" ||
                            m.BaseSkinName == "SRU_Razorbeak" && m.IsValidTarget(500) && m.Health <= 150);

                    if (BigJGMinion == null)
                    {
                        return;
                    }

                    HuntersPotion.Cast();
                }
            }

            LastRun = Environment.TickCount + 10000;
        }