コード例 #1
0
ファイル: GUI.cs プロジェクト: omeh2003/PetBattleEasy
        private static void UpdateForm()
        {
            var type  = Globals.Form.comboBox1.SelectedIndex;
            var level = (int)Globals.Form.EnemyLevel.Value;

            var slot1 = GoldenPet.BattleRating(1.GetPetlevel(), 1.PetHP(), BattlePet.Skills.GetPetType(BattlePet.Skills.PetOwner.Me, 1), type, level);
            var slot2 = GoldenPet.BattleRating(2.GetPetlevel(), 2.PetHP(), BattlePet.Skills.GetPetType(BattlePet.Skills.PetOwner.Me, 2), type, level);
            var slot3 = GoldenPet.BattleRating(3.GetPetlevel(), 3.PetHP(), BattlePet.Skills.GetPetType(BattlePet.Skills.PetOwner.Me, 3), type, level);

            Globals.Form.pictureBox2.WaitOnLoad = false;
            Globals.Form.pictureBox2.LoadAsync(ImgUrl(GoldenPet.Info(1).IconPath));
            Globals.Form.pictureBox3.WaitOnLoad = false;
            Globals.Form.pictureBox3.LoadAsync(ImgUrl(GoldenPet.Info(2).IconPath));
            Globals.Form.pictureBox4.WaitOnLoad = false;
            Globals.Form.pictureBox4.LoadAsync(ImgUrl(GoldenPet.Info(3).IconPath));
            Globals.Form.label11.Visible = true;
            Globals.Form.label11.Text    = GoldenPet.Info(1).Name;
            Globals.Form.label10.Visible = true;
            Globals.Form.label10.Text    = GoldenPet.Info(2).Name;
            Globals.Form.label9.Visible  = true;
            Globals.Form.label9.Text     = GoldenPet.Info(3).Name;
            Globals.Form.label6.Visible  = true;
            Globals.Form.label6.Text     = slot1.ToString();
            Globals.Form.label7.Visible  = true;
            Globals.Form.label7.Text     = slot2.ToString();
            Globals.Form.label8.Visible  = true;
            Globals.Form.label8.Text     = slot3.ToString();
        }
コード例 #2
0
        public static void Npc18839()
        {
            //Волшебный рак

            if (!CommandHasBuff(510, BattlePet.Skills.PetOwner.Me))
            {
                GoldenPet.Cast(2);
            }

            if (GoldenPet.ActiveSlotMe.PetHP() <= 70 && GoldenPet.CanCast(3))
            {
                GoldenPet.Cast(3);
            }
            if (CommandHasBuff(510, BattlePet.Skills.PetOwner.Me) && !GoldenPet.CanCast(3))
            {
                if (GoldenPet.Info(1).Stats.HealthPercentage < GoldenPet.ActiveSlotMe.PetHP() && GoldenPet.ActiveSlotMe != 1)
                {
                    BattlePet.Skills.ChangePet(1);
                }
                if (GoldenPet.Info(2).Stats.HealthPercentage < GoldenPet.ActiveSlotMe.PetHP() && GoldenPet.ActiveSlotMe != 2)
                {
                    BattlePet.Skills.ChangePet(2);
                }
                if (GoldenPet.Info(3).Stats.HealthPercentage < GoldenPet.ActiveSlotMe.PetHP() && GoldenPet.ActiveSlotMe != 3)
                {
                    BattlePet.Skills.ChangePet(3);
                }
            }

            GoldenPet.Cast(1);
        }