Ejemplo n.º 1
0
        internal void hackAim(ProcessMemoryReader mem, double x_angle, double y_angle)
        {
            float _x = Double2Float(x_angle);
            float _y = Double2Float(y_angle);

            mem.WriteFloat(base_addr + x_angle_offset, _x); // x 각도 세팅
            mem.WriteFloat(base_addr + y_angle_offset, _y); // y 각도 세팅
        }
Ejemplo n.º 2
0
        private void tmrProcess_Tick(object sender, EventArgs e)
        {
            if (gameFound && !SA[0].HasExited)
            {
                // Only the base address or multiLevel addresses need to be established first
                int playerBaseAddress = mem.ReadInt(offsets.baseAddr);
                // Stores an address which is the base address of the player struct.
                int XAddress = mem.ReadMultiLevelPointer(offsets.baseAddr, 4, offsets.xPos);
                // Multi level pointer with 2 offsets is needed to find the address of X position,
                // then this address can be read as a float.
                int ZAddress = mem.ReadMultiLevelPointer(offsets.baseAddr, 4, offsets.zPos);
                int YAddress = mem.ReadMultiLevelPointer(offsets.baseAddr, 4, offsets.yPos);


                lblX.Text = mem.ReadFloat(XAddress).ToString();
                lblZ.Text = mem.ReadFloat(ZAddress).ToString();
                lblY.Text = mem.ReadFloat(YAddress).ToString();

                lblHealth.Text = mem.ReadFloat(playerBaseAddress + offsets.health).ToString();

                int Hotkey = ProcessMemoryReaderApi.GetKeyState(0x74);//F5
                if ((Hotkey & 0x8000) != 0)
                {
                    // Teleport to Grove Street
                    mem.WriteFloat(XAddress, 2495);
                    mem.WriteFloat(ZAddress, -1668);
                    mem.WriteFloat(YAddress, 13);
                }

                int Hotkey2 = ProcessMemoryReaderApi.GetKeyState(0x75);//F6
                if ((Hotkey2 & 0x8000) != 0)
                {
                    // Teleport to Dome Stadium Roof
                    mem.WriteFloat(XAddress, 2737);
                    mem.WriteFloat(ZAddress, -1760);
                    mem.WriteFloat(YAddress, 44);
                }

                int Hotkey3 = ProcessMemoryReaderApi.GetKeyState(0x76);//F7
                if ((Hotkey3 & 0x8000) != 0)
                {
                    // Teleport to Skyscraper
                    mem.WriteFloat(XAddress, 1544);
                    mem.WriteFloat(ZAddress, -1353);
                    mem.WriteFloat(YAddress, 330);
                }
            }
            else
            {
                // Game has ended so stop performing readMemory etc
                gameFound           = false;
                btnAttach.BackColor = Color.Red;
                btnAttach.Enabled   = true;
            }
        }//tmrProcess
Ejemplo n.º 3
0
        void SetPlayerPosition(PlayerData player, Vector3 pos)
        {
            int playerBase = Mem.ReadMultiLevelPointer(myProcess[0].MainModule.BaseAddress.ToInt32() + player.baseAddress, 4, player.multiLevel);

            Mem.WriteFloat(playerBase - MainOffset + PlayerOffsets[1], pos.x);
            Mem.WriteFloat(playerBase - MainOffset + PlayerOffsets[2], pos.y);
            Mem.WriteFloat(playerBase - MainOffset + PlayerOffsets[3], pos.z);
        }
Ejemplo n.º 4
0
        public void SetPlayerFacing(Location destination)
        {
            var angle = GetFaceRadian(destination, ObjectManager.Me.Location);

            var thread    = _process.Threads[0];
            var threadPtr = Win32Imports.OpenThread(2032639U, false, (uint)thread.Id);

            Win32Imports.SuspendThread(threadPtr);

            _reader.WriteFloat(ObjectManager.Me.BaseAddress + (uint)Offsets.WowObject.OBJECT_FIELD_ROTATION, angle);

            thread    = _process.Threads[0];
            threadPtr = Win32Imports.OpenThread(2032639U, false, (uint)thread.Id);
            Win32Imports.ResumeThread(threadPtr);

            Thread.Sleep(50);

            Win32Imports.PostMessage(_process.MainWindowHandle, 0x100, (int)0x25, 0x14B0001);
            Win32Imports.PostMessage(_process.MainWindowHandle, 0x101, (int)0x25, (0x14B0001 + 0xC0000000));
        }
Ejemplo n.º 5
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (ProcessFound)
            {
                // Store entities memory addresses
                int LocalPlayerAddress = Mem.ReadMultiLevelPointer(LocalPlayerBase, 4, LocalPlayerOff);
                int Enemy1Address      = Mem.ReadMultiLevelPointer(Enemy1Base, 4, Enemy1Off);

                // Read Local PLayer Values
                int HealthValue     = Mem.ReadInt(LocalPlayerAddress + off_health);
                int RiffleAmmoValue = Mem.ReadInt(LocalPlayerAddress + off_rifle_ammo);

                // Read Enemy 1 Values
                int   Enemy1HealthValue = Mem.ReadInt(Enemy1Address);
                float Enemy1XPosValue   = Mem.ReadFloat(Enemy1Address - Enemy1XPos);
                float Enemy1YPosValue   = Mem.ReadFloat(Enemy1Address - Enemy1YPos);
                float Enemy1ZPosValue   = Mem.ReadFloat(Enemy1Address - Enemy1ZPos);

                // Local Player Lables
                Health.Text     = "Health: " + HealthValue.ToString();
                RiffleAmmo.Text = "Riffle Ammo: " + RiffleAmmoValue.ToString();

                // Enemy 1 Lables
                enemy1_hp_lable.Text   = "Enemy 1 HP: " + Enemy1HealthValue.ToString();
                enemy1_xpos_lable.Text = "X-Pos: " + Enemy1XPosValue.ToString();
                enemy1_ypos_lable.Text = "Y-Pos: " + Enemy1YPosValue.ToString();
                enemy1_zpos_lable.Text = "Z-Pos: " + Enemy1ZPosValue.ToString();


                if (RiffleAmmoValue < 5)
                {
                    // Set Local Player Riffle Ammo to 20 if it less than 5
                    Mem.WriteInt(LocalPlayerAddress + off_rifle_ammo, 20);
                    // Set Local Player HP to 1000 when ammo is less han 5
                    Mem.WriteInt(LocalPlayerAddress + off_health, 1000);
                }

                // Left mouse button pressed
                int pressedLeftMouse = ProcessMemoryReaderApi.GetKeyState(01);
                if ((pressedLeftMouse & 0x8000) != 0)
                {
                    Mem.WriteInt(LocalPlayerAddress + off_fire, 1);

                    // Remove Y-axin recoil when shooting
                    float Ymouse_pos = Mem.ReadFloat(LocalPlayerAddress + off_Ymouse);
                    Ymouse_pos -= 0.38f;
                    Mem.WriteFloat(LocalPlayerAddress + off_Ymouse, Ymouse_pos);
                }
                else
                {
                    Mem.WriteInt(LocalPlayerAddress + off_fire, 0);
                }

                // F1 button pressed
                int pressedF1 = ProcessMemoryReaderApi.GetKeyState(0x70);
                if ((pressedF1 & 0x8000) != 0)
                {
                    Mem.WriteFloat(LocalPlayerAddress + off_XPos, Enemy1XPosValue);
                    Mem.WriteFloat(LocalPlayerAddress + off_YPos, Enemy1YPosValue);
                    Mem.WriteFloat(LocalPlayerAddress + off_ZPos, Enemy1ZPosValue);
                }
            }
        }
Ejemplo n.º 6
0
 private void LoadCoords(int index)
 {
     mem.WriteFloat(player.pointerAddress + player.xPos, teleCoords[index, 0]);
     mem.WriteFloat(player.pointerAddress + player.yPos, teleCoords[index, 1]);
     mem.WriteFloat(player.pointerAddress + player.zPos, teleCoords[index, 2]);
 }
Ejemplo n.º 7
0
 private void upBTN_Click(object sender, EventArgs e)
 {
     Mem.WriteFloat(MainPlayer.baseAddress + MainPlayer.offsets.pitch, Mem.ReadFloat(MainPlayer.baseAddress + MainPlayer.offsets.pitch) + 10.0f);
 }