Exemplo n.º 1
0
        public ZombieSpawner(PvZProcess process)
        {
            mProcess = process;
            byte[] code = new byte[] {
                0x50,                                                                                                   //push ebx
                0x53,                                                                                                   //push eax
                0xA1, 0xF9, 0x29, 0x6E, 0x00,                                                                           //eax, [6E29F9]
                0x83, 0xF8, 0x01,                                                                                       //cmp eax, 1
                0x75, 0x1F,                                                                                             //je 1Fh
                0xFF, 0x35, 0xFD, 0x29, 0x6E, 0x00,                                                                     //push [6E29FD]
                0xFF, 0x35, 0x01, 0x2A, 0x6E, 0x00,                                                                     //push [6E2A01]
                0x8B, 0xC7,                                                                                             //mov eax, edi
                0xBB, 0xC0, 0xDD, 0x40, 0x00,                                                                           //mov ebx, 40DDC0h
                0xFF, 0xD3,                                                                                             //call ebx
                0xC7, 0x05, 0xF9, 0x29, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00,                                             //mov [6E29F9], 0
                0x5B,                                                                                                   //pop eax
                0x58
            };                                                                                                          //pop ebx

            //412A3C
            //412C0E
            //412DE0
            //412F86
            //413059		- 1
            //4263D2
            //429B90
            //42A103
            //439181		- MUST KEEP
            //534E17

            mProcess             = process;
            mSpawnerCode         = new CodeInjection(0x413D23, 6, code);
            mSpawnerCode.Process = mProcess;
        }
Exemplo n.º 2
0
        public MainForm()
        {
            try
            {
                mProcess = new PvZProcess();
            }
            catch (NullReferenceException e)
            {
                MessageBox.Show(e.Message + " If you have one, please report this as a bug at https://github.com/IntelOrca/PVZTools/issues.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(1);
            }

            InitializeComponent();

            this.Icon = Resources.orca_icon;
            MessageBox.Show("PvZ Tools will only work for the original version of Plants vs. Zombies. You will have to obtain this yourself. In the likely case that this program does not work for you, it is probably because you have the wrong version. I am unable to stop the game from spawning level zombies at this time. The source code for this can be found on GitHub (https://github.com/IntelOrca/PVZTools)", "Message from the author");

            chkPool.Checked = true;

            for (int i = 0; i < Zombie.szZombieTypes.Length; i++)
            {
                cmbZombieType.Items.Add(Zombie.szZombieTypes[i]);
            }

            cmbZombieType.SelectedIndex = 0;

            tmrSpawn.Interval = 2000;

            //CreateSliderGroup();

            UpdateStatus();
        }
Exemplo n.º 3
0
        public ZombiesForm(PvZProcess process)
        {
            mProcess = process;

            InitializeComponent();

            DoubleBuffered = true;

            AddColumn("IDX");
            AddColumn("X");
            AddColumn("Y");
            AddColumn("Layer");
            AddColumn("Health");
            AddColumn("Offset");

            if (!mProcess.IsRunning)
            {
                throw new Exception();
            }

            ReadZombies();
        }
Exemplo n.º 4
0
        public static void NoSunDecrease(PvZProcess process)
        {
            CodeReplacement cr = new CodeReplacement(0x41BA76, 6);

            cr.Activate();
        }