Exemplo n.º 1
0
        // Ultra Games

        public void getGame(object sender, EventArgs e)
        {
            InfoReadyEventArgs args = (InfoReadyEventArgs)e;

            string log = args.info;

            // Sun and Moon
            if (log.Contains("niji_loc"))
            {
                string splitlog = log.Substring(log.IndexOf(", pname: niji_loc") - 8, log.Length - log.IndexOf(", pname: niji_loc"));
                pid = Convert.ToInt32("0x" + splitlog.Substring(0, 8), 16);
                Program.helper.pid = pid;
                Program.scriptHelper.write(0x3E14C0, BitConverter.GetBytes(0xE3A01000), pid);
                MessageBox.Show("Connection Successful!");
                Program.f1.ChangeStatus("Pokémon Sun/Moon Connected!");
                Gamename = "SUMO";

                boxOff   = 0x330D9838;
                wcOff    = 0x331397E4;
                partyOff = 0x34195E10;
                eggOff   = 0x3313EDD8;
            }

            // Ultra Sun and Moon
            else if (log.Contains(", pname:   momiji"))
            {
                string splitlog = log.Substring(log.IndexOf(", pname:   momiji") - 8, log.Length - log.IndexOf(", pname:   momiji"));
                pid = Convert.ToInt32("0x" + splitlog.Substring(0, 8), 16);
                Program.helper.pid = pid;

                Program.scriptHelper.write(0x3E14C0, BitConverter.GetBytes(0xE3A01000), pid);
                MessageBox.Show("Connection Successful!");
                Program.f1.ChangeStatus("Pokémon Ultra - Sun/Moon Connected!");
                Gamename = "USUM";

                boxOff   = 0x33015AB0;
                wcOff    = 0x33075BF4;
                partyOff = 0x33F7FA44;
                eggOff   = 0x3307B1E8;
            }
            this.Gamename = Gamename;
            //Change Offsets of GameVersions
            if (Gamename == "SUMO")
            {
                boxOff = 0x330d9838; //To inject the pokemon into box1slot1
                wcOff  = 0x331397E4;
                eggOff = 0x3313EDD8;
            }
            else if (Gamename == "USUM")
            {
                boxOff = 0x33015AB0;
                wcOff  = 0x33075BF4;
                eggOff = 0x326601C4;
            }
        }
Exemplo n.º 2
0
 protected virtual void OnInfoReady(InfoReadyEventArgs e)
 {
     InfoReady?.Invoke(this, e);
 }