Exemplo n.º 1
0
        public void Delete(Button stone, Rectangle field)
        {
            Point skoceny;

            int puvodniRow   = Grid.GetRow(stone);
            int puvodniColum = Grid.GetColumn(stone);

            int novyRow   = Grid.GetRow(field);
            int novyColum = Grid.GetColumn(field);

            //string barva = kamen.Name.Split('_')[0];

            skoceny = new Point((puvodniColum + novyColum) / 2, (puvodniRow + novyRow) / 2);

            foreach (Button item in Reds)
            {
                if (Grid.GetRow(item) == skoceny.Y && Grid.GetColumn(item) == skoceny.X)
                {
                    Reds.Remove(item);
                    item.Visibility = Visibility.Hidden;
                    return;
                }
            }
            foreach (Button item in Blues)
            {
                if (Grid.GetRow(item) == skoceny.Y && Grid.GetColumn(item) == skoceny.X)
                {
                    Blues.Remove(item);
                    item.Visibility = Visibility.Hidden;
                    return;
                }
            }
        }
Exemplo n.º 2
0
        public void LoadStones()
        {
            Reds.Add(FormGame.Red_Kamen_01);
            Reds.Add(FormGame.Red_Kamen_02);
            Reds.Add(FormGame.Red_Kamen_03);
            Reds.Add(FormGame.Red_Kamen_04);
            Reds.Add(FormGame.Red_Kamen_05);
            Reds.Add(FormGame.Red_Kamen_06);
            Reds.Add(FormGame.Red_Kamen_07);
            Reds.Add(FormGame.Red_Kamen_08);
            Reds.Add(FormGame.Red_Kamen_09);
            Reds.Add(FormGame.Red_Kamen_10);
            Reds.Add(FormGame.Red_Kamen_11);
            Reds.Add(FormGame.Red_Kamen_12);

            Blues.Add(FormGame.Blue_Kamen_01);
            Blues.Add(FormGame.Blue_Kamen_02);
            Blues.Add(FormGame.Blue_Kamen_03);
            Blues.Add(FormGame.Blue_Kamen_04);
            Blues.Add(FormGame.Blue_Kamen_05);
            Blues.Add(FormGame.Blue_Kamen_06);
            Blues.Add(FormGame.Blue_Kamen_07);
            Blues.Add(FormGame.Blue_Kamen_08);
            Blues.Add(FormGame.Blue_Kamen_09);
            Blues.Add(FormGame.Blue_Kamen_10);
            Blues.Add(FormGame.Blue_Kamen_11);
            Blues.Add(FormGame.Blue_Kamen_12);
        }
Exemplo n.º 3
0
        public bool TestPattern(Point center, MapRecord map)
        {
            try
            {
                bool bluesOk;
                bool redsOk;
                if (Relativ)
                {
                    bluesOk = Blues.All(entry => GetCell(map, entry.X + center.X, entry.Y + center.Y).Walkable &&
                                        !GetCell(map, entry.X + center.X, entry.Y + center.Y).NonWalkableDuringFight);
                    redsOk = Reds.All(entry => GetCell(map, entry.X + center.X, entry.Y + center.Y).Walkable &&
                                      !GetCell(map, entry.X + center.X, entry.Y + center.Y).NonWalkableDuringFight);
                }
                else
                {
                    bluesOk = Blues.All(entry => GetCell(map, entry.X, entry.Y).Walkable &&
                                        !GetCell(map, entry.X, entry.Y).NonWalkableDuringFight);
                    redsOk = Reds.All(entry => GetCell(map, entry.X, entry.Y).Walkable &&
                                      !GetCell(map, entry.X, entry.Y).NonWalkableDuringFight);
                }

                return(bluesOk && redsOk);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemplo n.º 4
0
        private static void GameObjectOnOnDelete(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_AI_Minion))
            {
                return;
            }

            var obj = (Obj_AI_Minion)sender;
            var n   = obj.BaseSkinName;

            if (n == "SRU_Baron")
            {
                Baron = null;
                return;
            }

            if (n == "SRU_Dragon")
            {
                Dragon = null;
                return;
            }

            if (n == "SRU_Blue")
            {
                Blues.RemoveAll(x => x.NetworkId == obj.NetworkId);
                return;
            }

            if (n == "SRU_Red")
            {
                Reds.RemoveAll(x => x.NetworkId == obj.NetworkId);
            }
        }
Exemplo n.º 5
0
        private static void GameObjectOnOnCreate(GameObject sender, EventArgs args)
        {
            if (!(sender is Obj_AI_Minion))
            {
                return;
            }

            var obj = (Obj_AI_Minion)sender;
            var n   = obj.BaseSkinName;

            if (n == "SRU_Baron")
            {
                Baron = (Obj_AI_Minion)sender;
                return;
            }

            if (n == "SRU_Dragon")
            {
                Dragon = (Obj_AI_Minion)sender;
                return;
            }

            if (n == "SRU_Blue")
            {
                Blues.Add((Obj_AI_Minion)sender);
                return;
            }

            if (n == "SRU_Red")
            {
                Reds.Add((Obj_AI_Minion)sender);
            }
        }
Exemplo n.º 6
0
 public Form1()
 {
     InitializeComponent();
     Path.Text = Properties.Settings.Default.bluestack_path;
     try
     {
         //Process.Start(Properties.Settings.Default.bluestack_path);
         Blues.StartInfo.FileName = Properties.Settings.Default.bluestack_path;
         Blues.Start();
     }
     catch (Exception)
     {
         MessageBox.Show("Errore nell'apertura di Bluestacks", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 7
0
        static void Game_OnGameUpdate(EventArgs args)
        {
            // Update the notification
            NotificationHandler.Update();

            if (!(Menu.Item("Enabled").IsActive() || Menu.Item("EnabledKeybind").IsActive()))
            {
                return;
            }

            // Sort the spells
            var index = Menu.Item("SortRule").GetValue <StringList>().SelectedValue;

            switch (index)
            {
            case "Most Damage":
                Spells = Spells.OrderByDescending(x => x.GetDamage(Player)).ToList();
                break;

            case "Least Damage":
                Spells = Spells.OrderBy(x => x.GetDamage(Player)).ToList();
                break;

            case "Biggest Range":
                Spells = Spells.OrderByDescending(x => x.Range).ToList();
                break;

            case "Smallest Range":
                Spells = Spells.OrderBy(x => x.Range).ToList();
                break;

            case "Smallest Cast Time":
                Spells = Spells.OrderBy(x => x.Delay).ToList();
                break;
            }

            // Get baron
            if (Baron != null && Baron.IsValid && Baron.Health > 0)
            {
                foreach (var spell in Spells.Where(x => x.IsReady() && x.IsInRange(Baron, x.Range) && SkillEnabled("Steal", x.Slot)))
                {
                    var time             = (1000 * Player.Distance(Baron) / spell.Speed) + spell.Delay * 1000 + Game.Ping / 2f;
                    var healthPrediciton = HealthPrediction.GetHealthPrediction(Baron, (int)time);

                    if (!(spell.GetDamage(Baron) > Baron.Health))
                    {
                        continue;
                    }

                    spell.Cast(Baron.ServerPosition);
                    break;
                }
            }

            // Get dragon
            if (Dragon != null && Dragon.IsValid && Dragon.Health > 0)
            {
                foreach (var spell in Spells.Where(x => x.IsReady() && x.IsInRange(Dragon, x.Range) && SkillEnabled("Steal", x.Slot)))
                {
                    var time             = (1000 * Player.Distance(Dragon) / spell.Speed) + spell.Delay * 1000 + Game.Ping / 2f;
                    var healthPrediciton = HealthPrediction.GetHealthPrediction(Dragon, (int)time);

                    if (!(spell.GetDamage(Dragon) > Dragon.Health))
                    {
                        continue;
                    }

                    spell.Cast(Dragon.ServerPosition);
                    break;
                }
            }

            // Get Blue
            foreach (var blue in Blues.Where(x => x.IsValid && x.Health > 0))
            {
                var blue1 = blue;
                foreach (var spell in Spells.Where(x => x.IsReady() && x.IsInRange(blue1, x.Range) && SkillEnabled("Buff", x.Slot)))
                {
                    var time             = (1000 * Player.Distance(blue) / spell.Speed) + spell.Delay * 1000 + Game.Ping / 2f;
                    var healthPrediciton = HealthPrediction.GetHealthPrediction(blue, (int)time);

                    if (!(spell.GetDamage(blue) > blue.Health))
                    {
                        continue;
                    }

                    spell.Cast(blue.ServerPosition);
                    break;
                }
            }

            // Get Red
            foreach (var red in Reds.Where(x => x.IsValid && x.Health > 0))
            {
                var red1 = red;
                foreach (var spell in Spells.Where(x => x.IsReady() && x.IsInRange(red1, x.Range) && SkillEnabled("Buff", x.Slot)))
                {
                    var time             = (1000 * Player.Distance(red) / spell.Speed) + spell.Delay * 1000 + Game.Ping / 2f;
                    var healthPrediciton = HealthPrediction.GetHealthPrediction(red, (int)time);

                    if (!(spell.GetDamage(red) > red.Health))
                    {
                        continue;
                    }

                    spell.Cast(red.ServerPosition);
                    break;
                }
            }

            // Kill SECURE
            foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
            {
                var hero1 = hero;
                foreach (var spell in Spells.Where(x => x.IsReady() && x.IsInRange(hero1, x.Range) && SkillEnabled("KS", x.Slot)))
                {
                    var time             = (1000 * Player.Distance(hero) / spell.Speed) + spell.Delay * 1000 + Game.Ping / 2f;
                    var healthPrediciton = HealthPrediction.GetHealthPrediction(hero, (int)time);

                    if (!(spell.GetDamage(hero) > hero.Health))
                    {
                        continue;
                    }

                    spell.Cast(hero.ServerPosition);
                    break;
                }
            }
        }
Exemplo n.º 8
0
 /// <summary>
 /// Copies this instance's RGB arrays to the RGB arrays of another instance.
 /// </summary>
 /// <param name="copyTo"></param>
 public void CopyTo(PaletteSet copyTo)
 {
     Reds.CopyTo(copyTo.Reds, 0);
     Greens.CopyTo(copyTo.Greens, 0);
     Blues.CopyTo(copyTo.Blues, 0);
 }