Exemplo n.º 1
0
        public RSWE()
        {
            InitializeComponent();
            Console.WriteLine("Started RSWE");
            spec = new[]
            {
                CB_Grass1, CB_Grass2, CB_Grass3, CB_Grass4, CB_Grass5, CB_Grass6, CB_Grass7, CB_Grass8, CB_Grass9, CB_Grass10, CB_Grass11, CB_Grass12,
                CB_TallGrass1, CB_TallGrass2, CB_TallGrass3, CB_TallGrass4, CB_TallGrass5, CB_TallGrass6, CB_TallGrass7, CB_TallGrass8, CB_TallGrass9, CB_TallGrass10, CB_TallGrass11, CB_TallGrass12,
                CB_Swarm1, CB_Swarm2, CB_Swarm3,
                CB_Surf1, CB_Surf2, CB_Surf3, CB_Surf4, CB_Surf5,
                CB_RockSmash1, CB_RockSmash2, CB_RockSmash3, CB_RockSmash4, CB_RockSmash5,
                CB_Old1, CB_Old2, CB_Old3,
                CB_Good1, CB_Good2, CB_Good3,
                CB_Super1, CB_Super2, CB_Super3,
                CB_HordeA1, CB_HordeA2, CB_HordeA3, CB_HordeA4, CB_HordeA5,
                CB_HordeB1, CB_HordeB2, CB_HordeB3, CB_HordeB4, CB_HordeB5,
                CB_HordeC1, CB_HordeC2, CB_HordeC3, CB_HordeC4, CB_HordeC5,
            };
            min = new[]
            {
                NUP_GrassMin1, NUP_GrassMin2, NUP_GrassMin3, NUP_GrassMin4, NUP_GrassMin5, NUP_GrassMin6, NUP_GrassMin7, NUP_GrassMin8, NUP_GrassMin9, NUP_GrassMin10, NUP_GrassMin11, NUP_GrassMin12,
                NUP_TallGrassMin1, NUP_TallGrassMin2, NUP_TallGrassMin3, NUP_TallGrassMin4, NUP_TallGrassMin5, NUP_TallGrassMin6, NUP_TallGrassMin7, NUP_TallGrassMin8, NUP_TallGrassMin9, NUP_TallGrassMin10, NUP_TallGrassMin11, NUP_TallGrassMin12,
                NUP_SwarmMin1, NUP_SwarmMin2, NUP_SwarmMin3,
                NUP_SurfMin1, NUP_SurfMin2, NUP_SurfMin3, NUP_SurfMin4, NUP_SurfMin5,
                NUP_RockSmashMin1, NUP_RockSmashMin2, NUP_RockSmashMin3, NUP_RockSmashMin4, NUP_RockSmashMin5,
                NUP_OldMin1, NUP_OldMin2, NUP_OldMin3,
                NUP_GoodMin1, NUP_GoodMin2, NUP_GoodMin3,
                NUP_SuperMin1, NUP_SuperMin2, NUP_SuperMin3,
                NUP_HordeAMin1, NUP_HordeAMin2, NUP_HordeAMin3, NUP_HordeAMin4, NUP_HordeAMin5,
                NUP_HordeBMin1, NUP_HordeBMin2, NUP_HordeBMin3, NUP_HordeBMin4, NUP_HordeBMin5,
                NUP_HordeCMin1, NUP_HordeCMin2, NUP_HordeCMin3, NUP_HordeCMin4, NUP_HordeCMin5,
            };
            max = new[]
            {
                NUP_GrassMax1, NUP_GrassMax2, NUP_GrassMax3, NUP_GrassMax4, NUP_GrassMax5, NUP_GrassMax6, NUP_GrassMax7, NUP_GrassMax8, NUP_GrassMax9, NUP_GrassMax10, NUP_GrassMax11, NUP_GrassMax12,
                NUP_TallGrassMax1, NUP_TallGrassMax2, NUP_TallGrassMax3, NUP_TallGrassMax4, NUP_TallGrassMax5, NUP_TallGrassMax6, NUP_TallGrassMax7, NUP_TallGrassMax8, NUP_TallGrassMax9, NUP_TallGrassMax10, NUP_TallGrassMax11, NUP_TallGrassMax12,
                NUP_SwarmMax1, NUP_SwarmMax2, NUP_SwarmMax3,
                NUP_SurfMax1, NUP_SurfMax2, NUP_SurfMax3, NUP_SurfMax4, NUP_SurfMax5,
                NUP_RockSmashMax1, NUP_RockSmashMax2, NUP_RockSmashMax3, NUP_RockSmashMax4, NUP_RockSmashMax5,
                NUP_OldMax1, NUP_OldMax2, NUP_OldMax3,
                NUP_GoodMax1, NUP_GoodMax2, NUP_GoodMax3,
                NUP_SuperMax1, NUP_SuperMax2, NUP_SuperMax3,
                NUP_HordeAMax1, NUP_HordeAMax2, NUP_HordeAMax3, NUP_HordeAMax4, NUP_HordeAMax5,
                NUP_HordeBMax1, NUP_HordeBMax2, NUP_HordeBMax3, NUP_HordeBMax4, NUP_HordeBMax5,
                NUP_HordeCMax1, NUP_HordeCMax2, NUP_HordeCMax3, NUP_HordeCMax4, NUP_HordeCMax5,
            };
            form = new[]
            {
                NUP_GrassForme1, NUP_GrassForme2, NUP_GrassForme3, NUP_GrassForme4, NUP_GrassForme5, NUP_GrassForme6, NUP_GrassForme7, NUP_GrassForme8, NUP_GrassForme9, NUP_GrassForme10, NUP_GrassForme11, NUP_GrassForme12,
                NUP_TallGrassForme1, NUP_TallGrassForme2, NUP_TallGrassForme3, NUP_TallGrassForme4, NUP_TallGrassForme5, NUP_TallGrassForme6, NUP_TallGrassForme7, NUP_TallGrassForme8, NUP_TallGrassForme9, NUP_TallGrassForme10, NUP_TallGrassForme11, NUP_TallGrassForme12,
                NUP_SwarmForme1, NUP_SwarmForme2, NUP_SwarmForme3,
                NUP_SurfForme1, NUP_SurfForme2, NUP_SurfForme3, NUP_SurfForme4, NUP_SurfForme5,
                NUP_RockSmashForme1, NUP_RockSmashForme2, NUP_RockSmashForme3, NUP_RockSmashForme4, NUP_RockSmashForme5,
                NUP_OldForme1, NUP_OldForme2, NUP_OldForme3,
                NUP_GoodForme1, NUP_GoodForme2, NUP_GoodForme3,
                NUP_SuperForme1, NUP_SuperForme2, NUP_SuperForme3,
                NUP_HordeAForme1, NUP_HordeAForme2, NUP_HordeAForme3, NUP_HordeAForme4, NUP_HordeAForme5,
                NUP_HordeBForme1, NUP_HordeBForme2, NUP_HordeBForme3, NUP_HordeBForme4, NUP_HordeBForme5,
                NUP_HordeCForme1, NUP_HordeCForme2, NUP_HordeCForme3, NUP_HordeCForme4, NUP_HordeCForme5,
            };
            formlist = new[] { "Unown-A - 0",
                               "Unown-B - 1",
                               "Unown-C - 2",
                               "Unown-D - 3",
                               "Unown-E - 4",
                               "Unown-F - 5",
                               "Unown-G - 6",
                               "Unown-H - 7",
                               "Unown-I - 8",
                               "Unown-J - 9",
                               "Unown-K - 10",
                               "Unown-L - 11",
                               "Unown-M - 12",
                               "Unown-N - 13",
                               "Unown-O - 14",
                               "Unown-P - 15",
                               "Unown-Q - 16",
                               "Unown-R - 17",
                               "Unown-S - 18",
                               "Unown-T - 19",
                               "Unown-U - 20",
                               "Unown-V - 21",
                               "Unown-W - 22",
                               "Unown-X - 23",
                               "Unown-Y - 24",
                               "Unown-Z - 25",
                               "Unown-! - 26",
                               "Unown-? - 27",
                               "",
                               "Castform-Normal - 0",
                               "Castform-Sunny - 1",
                               "Castform-Rainy - 2",
                               "Castform-Snowy - 3",
                               "",
                               "Deoxys-Normal - 0",
                               "Deoxys-Attack - 1",
                               "Deoxys-Defense - 2",
                               "Deoxys-Speed - 3",
                               "",
                               "Burmy-Plant Cloak - 0",
                               "Burmy-Sandy Cloak - 1",
                               "Burmy-Trash Cloak - 2",
                               "",
                               "Wormadam-Plant Cloak - 0",
                               "Wormadam-Sandy Cloak - 1",
                               "Wormadam-Trash Cloak - 2",
                               "",
                               "Cherrim-Overcast - 0",
                               "Cherrim-Sunshine - 1",
                               "",
                               "Shellos-West Sea - 0",
                               "Shellos-East Sea - 1",
                               "",
                               "Gastrodon-West Sea - 0",
                               "Gastrodon-East Sea - 1",
                               "",
                               "Rotom-Normal - 0",
                               "Rotom-Heat - 1",
                               "Rotom-Wash - 2",
                               "Rotom-Frost - 3",
                               "Rotom-Fan - 4",
                               "Rotom-Mow - 5",
                               "",
                               "Giratina-Altered - 0",
                               "Giratina-Origin - 1",
                               "",
                               "Shaymin-Land - 0",
                               "Shaymin-Sky - 1",
                               "",
                               "Arceus-Normal - 0",
                               "Arceus-Fighting - 1",
                               "Arceus-Flying - 2",
                               "Arceus-Poison - 3",
                               "Arceus-Ground - 4",
                               "Arceus-Rock - 5",
                               "Arceus-Bug - 6",
                               "Arceus-Ghost - 7",
                               "Arceus-Steel - 8",
                               "Arceus-Fire - 9",
                               "Arceus-Water - 10",
                               "Arceus-Grass - 11",
                               "Arceus-Electric - 12",
                               "Arceus-Psychic - 13",
                               "Arceus-Ice - 14",
                               "Arceus-Dragon - 15",
                               "Arceus-Dark - 16",
                               "",
                               "Basculin-Red-Striped - 0",
                               "Basculin-Blue-Striped - 1",
                               "",
                               "Darmanitan-Standard Mode - 0",
                               "Darmanitan-Zen Mode - 1",
                               "",
                               "Deerling-Spring - 0",
                               "Deerling-Summer - 1",
                               "Deerling-Autumn - 2",
                               "Deerling-Winter - 3",
                               "",
                               "Sawsbuck-Spring - 0",
                               "Sawsbuck-Summer - 1",
                               "Sawsbuck-Autumn - 2",
                               "Sawsbuck-Winter - 3",
                               "",
                               "Tornadus-Incarnate - 0",
                               "Tornadus-Therian - 1",
                               "",
                               "Thundurus-Incarnate - 0",
                               "Thundurus-Therian - 1",
                               "",
                               "Landorus-Incarnate - 0",
                               "Landorus-Therian - 1",
                               "",
                               "Kyurem-Normal - 0",
                               "Kyurem-White - 1",
                               "Kyurem-Black - 2",
                               "",
                               "Keldeo-Usual - 0",
                               "Keldeo-Resolution - 1",
                               "",
                               "Meloetta-Aria - 0",
                               "Meloetta-Pirouette - 1",
                               "",
                               "Genesect-Normal - 0",
                               "Genesect-Water - 1",
                               "Genesect-Electric - 2",
                               "Genesect-Fire - 3",
                               "Genesect-Ice - 4",
                               "",
                               "Flabebe-Red - 0",
                               "Flabebe-Yellow - 1",
                               "Flabebe-Orange - 2",
                               "Flabebe-Blue - 3",
                               "Flabebe-White - 4",
                               "",
                               "Floette-Red - 0",
                               "Floette-Yellow - 1",
                               "Floette-Orange - 2",
                               "Floette-Blue - 3",
                               "Floette-Wite - 4",
                               "Floette-Eternal - 5",
                               "",
                               "Florges-Red - 0",
                               "Florges-Yellow - 1",
                               "Florges-Orange - 2",
                               "Florges-Blue - 3",
                               "Florges-White - 4",
                               "",
                               "Furfrou- Natural - 0",
                               "Furfrou- Heart - 1",
                               "Furfrou- Star - 2",
                               "Furfrou- Diamond - 3",
                               "Furfrou- Deputante - 4",
                               "Furfrou- Matron - 5",
                               "Furfrou- Dandy - 6",
                               "Furfrou- La Reine- 7",
                               "Furfrou- Kabuki - 8",
                               "Furfrou- Pharaoh - 9",
                               "",
                               "Aegislash- Shield - 0",
                               "Aegislash- Blade - 0",
                               "",
                               "Vivillon-Icy Snow - 0",
                               "Vivillon-Polar - 1",
                               "Vivillon-Tundra - 2",
                               "Vivillon-Continental  - 3",
                               "Vivillon-Garden - 4",
                               "Vivillon-Elegant - 5",
                               "Vivillon-Meadow - 6",
                               "Vivillon-Modern  - 7",
                               "Vivillon-Marine - 8",
                               "Vivillon-Archipelago - 9",
                               "Vivillon-High-Plains - 10",
                               "Vivillon-Sandstorm - 11",
                               "Vivillon-River - 12",
                               "Vivillon-Monsoon - 13",
                               "Vivillon-Savannah  - 14",
                               "Vivillon-Sun - 15",
                               "Vivillon-Ocean - 16",
                               "Vivillon-Jungle - 17",
                               "Vivillon-Fancy - 18",
                               "Vivillon-Poké Ball - 19",
                               "",
                               "Pumpkaboo/Gourgeist-Small - 0",
                               "Pumpkaboo/Gourgeist-Average - 1",
                               "Pumpkaboo/Gourgeist-Large - 2",
                               "Pumpkaboo/Gourgeist-Super - 3",
                               "",
                               "Hoopa-Normal - 0",
                               "Hoopa-Unbound - 1",
                               "",
                               "Megas-Normal - 0",
                               "Megas-Mega (X) - 1",
                               "Megas-Mega (Y) - 2", };
            RSWE_Load();
            openQuick(Directory.GetFiles("encdata"));

            string[] personalList = Directory.GetFiles("personal");
            personalData = File.ReadAllBytes(personalList[personalList.Length - 1]);
            indexList    = Personal.getPersonalIndexList(personalData, Main.oras);
            personal     = new byte[personalList.Length][];
            for (int i = 0; i < personalList.Length; i++)
            {
                personal[i] = File.ReadAllBytes("personal" + Path.DirectorySeparatorChar + i.ToString("000") + ".bin");
            }
        }
Exemplo n.º 2
0
        private void Setup()
        {
            start = true;
            byte[] personalData = File.ReadAllBytes(Directory.GetFiles("personal").Last());
            indexList = Personal.getPersonalIndexList(personalData, Main.oras);
            AltForms  = Personal.getFormList(personalData, Main.oras, specieslist, forms, types, itemlist);

            Array.Resize(ref trName, trdatapaths.Length);
            CB_TrainerID.Items.Clear();
            for (int i = 0; i < trdatapaths.Length; i++)
            {
                CB_TrainerID.Items.Add(string.Format("{1} - {0}", i.ToString("000"), trName[i] ?? "UNKNOWN"));
            }

            CB_Trainer_Class.Items.Clear();
            for (int i = 0; i < trClass.Length; i++)
            {
                CB_Trainer_Class.Items.Add(string.Format("{1} - {0}", i.ToString("000"), trClass[i]));
            }

            specieslist[0] = "---";
            abilitylist[0] = itemlist[0] = movelist[0] = "";
            pba            = new[] { PB_Team1, PB_Team2, PB_Team3, PB_Team4, PB_Team5, PB_Team6 };

            for (int i = 0; i < 6; i++)
            {
                trpk_pkm[i].Items.Clear();
                foreach (string s in specieslist)
                {
                    trpk_pkm[i].Items.Add(s);
                }

                trpk_m1[i].Items.Clear();
                trpk_m2[i].Items.Clear();
                trpk_m3[i].Items.Clear();
                trpk_m4[i].Items.Clear();
                foreach (string s in movelist)
                {
                    trpk_m1[i].Items.Add(s);
                    trpk_m2[i].Items.Add(s);
                    trpk_m3[i].Items.Add(s);
                    trpk_m4[i].Items.Add(s);
                }

                trpk_item[i].Items.Clear();
                foreach (string s in itemlist)
                {
                    trpk_item[i].Items.Add(s);
                }

                trpk_lvl[i].Items.Clear();
                for (int z = 0; z <= 100; z++)
                {
                    trpk_lvl[i].Items.Add(z.ToString());
                }

                trpk_IV[i].Items.Clear();
                for (int z = 0; z < 256; z++)
                {
                    trpk_IV[i].Items.Add(z.ToString());
                }

                trpk_gender[i].Items.Clear();
                trpk_gender[i].Items.Add("- / G/Random");
                trpk_gender[i].Items.Add("♂ / M");
                trpk_gender[i].Items.Add("♀ / F");

                trpk_form[i].Items.Add("");

                trpk_pkm[i].SelectedIndex = 0;
            }
            CB_Item_1.Items.Clear();
            CB_Item_2.Items.Clear();
            CB_Item_3.Items.Clear();
            CB_Item_4.Items.Clear();
            CB_Prize.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item_1.Items.Add(s);
                CB_Item_2.Items.Add(s);
                CB_Item_3.Items.Add(s);
                CB_Item_4.Items.Add(s);
                CB_Prize.Items.Add(s);
            }

            CB_AI.Items.Clear(); CB_Money.Items.Clear();
            for (int i = 0; i < 256; i++)
            {
                CB_AI.Items.Add(i.ToString()); CB_Money.Items.Add(i.ToString());
            }

            CB_Battle_Type.Items.Clear();
            CB_Battle_Type.Items.Add("Single");
            CB_Battle_Type.Items.Add("Double");
            CB_Battle_Type.Items.Add("Triple");
            CB_Battle_Type.Items.Add("Rotation");
            CB_Battle_Type.Items.Add("Horde");
            megaEvos = Main.oras
                ? new[] { 15, 18, 80, 208, 254, 260, 302, 319, 323, 334, 362, 373, 376, 380, 381, 428, 475, 531, 719, 3, 6, 9, 65, 94, 115, 127, 130, 142, 150, 181, 212, 214, 229, 248, 257, 282, 303, 306, 308, 310, 354, 359, 445, 448, 460 }
                : new[] { 3, 6, 9, 65, 94, 115, 127, 130, 142, 150, 181, 212, 214, 229, 248, 257, 282, 303, 306, 308, 310, 354, 359, 445, 448, 460 };

            CB_TrainerID.SelectedIndex = 1;
            start = false;
            readFile();
            SystemSounds.Asterisk.Play();
        }
Exemplo n.º 3
0
        private void Setup()
        {
            start = true;
            string[] personalList = Directory.GetFiles("personal");
            personalData = File.ReadAllBytes(personalList[personalList.Length - 1]);
            indexList    = Personal.getPersonalIndexList(personalData, Main.oras);
            personal     = new byte[personalList.Length][];
            for (int i = 0; i < personalList.Length; i++)
            {
                personal[i] = File.ReadAllBytes("personal" + Path.DirectorySeparatorChar + i.ToString("000") + ".bin");
            }
            AltForms = Personal.getFormList(personalData, Main.oras, specieslist, forms, types, itemlist);

            Array.Resize(ref trName, trdatapaths.Length);
            CB_TrainerID.Items.Clear();
            for (int i = 0; i < trdatapaths.Length; i++)
            {
                CB_TrainerID.Items.Add(String.Format("{1} - {0}", i.ToString("000"), trName[i] ?? "UNKNOWN"));
            }

            CB_Trainer_Class.Items.Clear();
            for (int i = 0; i < trClass.Length; i++)
            {
                CB_Trainer_Class.Items.Add(String.Format("{1} - {0}", i.ToString("000"), trClass[i]));
            }

            specieslist[0] = "---";
            abilitylist[0] = itemlist[0] = movelist[0] = "";

            for (int i = 0; i < 6; i++)
            {
                trpk_pkm[i].Items.Clear();
                foreach (string s in specieslist)
                {
                    trpk_pkm[i].Items.Add(s);
                }

                trpk_m1[i].Items.Clear();
                trpk_m2[i].Items.Clear();
                trpk_m3[i].Items.Clear();
                trpk_m4[i].Items.Clear();
                foreach (string s in movelist)
                {
                    trpk_m1[i].Items.Add(s);
                    trpk_m2[i].Items.Add(s);
                    trpk_m3[i].Items.Add(s);
                    trpk_m4[i].Items.Add(s);
                }

                trpk_item[i].Items.Clear();
                foreach (string s in itemlist)
                {
                    trpk_item[i].Items.Add(s);
                }

                trpk_lvl[i].Items.Clear();
                for (int z = 0; z <= 100; z++)
                {
                    trpk_lvl[i].Items.Add((z).ToString());
                }

                trpk_IV[i].Items.Clear();
                for (int z = 0; z < 256; z++)
                {
                    trpk_IV[i].Items.Add(z.ToString());
                }

                trpk_gender[i].Items.Clear();
                trpk_gender[i].Items.Add("- / G/Random");
                trpk_gender[i].Items.Add("♂ / M");
                trpk_gender[i].Items.Add("♀ / F");

                trpk_form[i].Items.Add("");

                trpk_pkm[i].SelectedIndex = 0;
            }
            CB_Item_1.Items.Clear();
            CB_Item_2.Items.Clear();
            CB_Item_3.Items.Clear();
            CB_Item_4.Items.Clear();
            CB_Prize.Items.Clear();
            foreach (string s in itemlist)
            {
                CB_Item_1.Items.Add(s);
                CB_Item_2.Items.Add(s);
                CB_Item_3.Items.Add(s);
                CB_Item_4.Items.Add(s);
                CB_Prize.Items.Add(s);
            }

            CB_AI.Items.Clear(); CB_Money.Items.Clear();
            for (int i = 0; i < 256; i++)
            {
                CB_AI.Items.Add(i.ToString()); CB_Money.Items.Add(i.ToString());
            }

            CB_Battle_Type.Items.Clear();
            CB_Battle_Type.Items.Add("Single");
            CB_Battle_Type.Items.Add("Double");
            CB_Battle_Type.Items.Add("Triple");
            CB_Battle_Type.Items.Add("Rotation");
            CB_Battle_Type.Items.Add("Horde");

            CB_TrainerID.SelectedIndex = 1;
            start = false;
            readFile();
            System.Media.SystemSounds.Asterisk.Play();
        }