Exemple #1
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
 public void SetPlayerData(ProcessMemoryReader mem)
 {
     health       = mem.ReadInt(base_addr + health_offset);
     bullet_proof = mem.ReadInt(base_addr + bullet_proof_offset);
     ammo         = mem.ReadInt(base_addr + ammo_offset);
     x_pos        = mem.ReadFloat(base_addr + x_pos_offset);
     y_pos        = mem.ReadFloat(base_addr + y_pos_offset);
     z_pos        = mem.ReadFloat(base_addr + z_pos_offset);
     x_angle      = mem.ReadFloat(base_addr + x_angle_offset);
     y_angle      = mem.ReadFloat(base_addr + y_angle_offset);
 }
Exemple #3
0
        public Buff(ProcessMemoryReader reader, int pointer)
        {
            StartTime = reader.ReadFloat(pointer + Offsets.BuffStartTime);
            EndTime   = reader.ReadFloat(pointer + Offsets.BuffEndTime);
            int buffInfo = reader.ReadInt(pointer + Offsets.BuffEntryBuff);

            if (buffInfo < 10)
            {
                return;
            }
            Name = reader.ReadCString(buffInfo + Offsets.BuffName, 240);
        }
Exemple #4
0
        private void LoopTMR_Tick(object sender, EventArgs e)
        {
            if (attach)
            {
                try
                {
                    // Step2 Value를 찾아서 모니터링 (현재 값이 무엇인지 계속적으로 확인)
                    int step2SturctAddress = mem.ReadMultiLevelPointer(step2Data.baseAddress, 4, step2Data.multiLevel);
                    int step2value         = mem.ReadInt(step2SturctAddress + step2Data.offsets.health);
                    Step2ValueLBL.Text = "Step 2 Value: " + step2value;

                    // Step8 Value를 찾아서 모니터링
                    int step8SturctAddress = mem.ReadMultiLevelPointer(step8Data.baseAddress, 4, step8Data.multiLevel);
                    int step8value         = mem.ReadInt(step8SturctAddress + step8Data.offsets.health);
                    Step8ValueLBL.Text = "Step 8 Value: " + step8value;

                    // Step9의 플레이어 데이터를 모니터링
                    int p1Base = mem.ReadMultiLevelPointer(step9PlayerData.baseAddress, 4, step9PlayerData.step9P1multiLevel);
                    int p2Base = mem.ReadMultiLevelPointer(step9PlayerData.baseAddress, 4, step9PlayerData.step9P2multiLevel);
                    int p3Base = mem.ReadMultiLevelPointer(step9PlayerData.baseAddress, 4, step9PlayerData.step9P3multiLevel);
                    int p4Base = mem.ReadMultiLevelPointer(step9PlayerData.baseAddress, 4, step9PlayerData.step9P4multiLevel);

                    P1LBL.Text = "P1: [" + mem.ReadInt(p1Base + step9PlayerData.teamOffset) + " 팀]" + mem.ReadString(p1Base + step9PlayerData.nameOffset) + ": " + mem.ReadFloat(p1Base + step9PlayerData.healthOffset);
                    P2LBL.Text = "P2: [" + mem.ReadInt(p2Base + step9PlayerData.teamOffset) + " 팀]" + mem.ReadString(p2Base + step9PlayerData.nameOffset) + ": " + mem.ReadFloat(p2Base + step9PlayerData.healthOffset);
                    P3LBL.Text = "P3: [" + mem.ReadInt(p3Base + step9PlayerData.teamOffset) + " 팀]" + mem.ReadString(p3Base + step9PlayerData.nameOffset) + ": " + mem.ReadFloat(p3Base + step9PlayerData.healthOffset);
                    P4LBL.Text = "P4: [" + mem.ReadInt(p4Base + step9PlayerData.teamOffset) + " 팀]" + mem.ReadString(p4Base + step9PlayerData.nameOffset) + ": " + mem.ReadFloat(p4Base + step9PlayerData.healthOffset);

                    // 크랙을 동작시켰을때, 현재 크랙이 값을 수정하도록 만드는 작업
                    int hotkey = ProcessMemoryReaderApi.GetKeyState(0x02); // 마우스 오른쪽키에 대한 상태
                    if ((hotkey & 0x8000) != 0)                            // 키가 눌렸을 경우
                    {
                        if (crackState == false)                           // 크랙이 꺼져있는 경우에는 크랙 켜고 크랙 시도!
                        {
                            crackState          = true;
                            CrackStatusLBL.Text = "크랙 상태: On";
                        }
                        else // 크랙이 켜져있는 경우에는 크랙을 끕니다.
                        {
                            crackState          = false;
                            CrackStatusLBL.Text = "크랙 상태: Off";
                        }
                    }
                    if (crackState)
                    {
                        Step2Solve(step2SturctAddress); // step2 Value를 1000으로 수정
                        Step8Solve(step8SturctAddress); // step2 Value를 1000으로 수정
                    }
                }
                catch (Exception ex)
                {
                    crackState = false;
                    MessageBox.Show("읽기 쓰기 오류: " + ex.Message);
                }
            }
        }
Exemple #5
0
        void UpdatePlayerInfo()
        {
            int playerBase = Mem.ReadMultiLevelPointer(myProcess[0].MainModule.BaseAddress.ToInt32() + m_mainPlayer.baseAddress, 4, m_mainPlayer.multiLevel);

            int hp = Mem.ReadInt(playerBase - MainOffset + PlayerOffsets[0]);

            Vector3 pos = new Vector3(Mem.ReadFloat(playerBase - MainOffset + PlayerOffsets[1]),
                                      Mem.ReadFloat(playerBase - MainOffset + PlayerOffsets[2]),
                                      Mem.ReadFloat(playerBase - MainOffset + PlayerOffsets[3]));

            Vector3 velo = new Vector3(Mem.ReadFloat(playerBase - MainOffset + PlayerOffsets[4]),
                                       Mem.ReadFloat(playerBase - MainOffset + PlayerOffsets[5]),
                                       Mem.ReadFloat(playerBase - MainOffset + PlayerOffsets[6]));



            m_mainPlayer.Update(Mem.ReadInt(playerBase - MainOffset + PlayerOffsets[0]), pos, velo);


            foreach (PlayerData ai in m_AiPlayer)
            {
                int aiBase = Mem.ReadMultiLevelPointer(myProcess[0].MainModule.BaseAddress.ToInt32() + ai.baseAddress, 4, ai.multiLevel);

                hp = Mem.ReadInt(aiBase - MainOffset + PlayerOffsets[0]);

                pos = new Vector3(Mem.ReadFloat(aiBase - MainOffset + PlayerOffsets[1]),
                                  Mem.ReadFloat(aiBase - MainOffset + PlayerOffsets[2]),
                                  Mem.ReadFloat(aiBase - MainOffset + PlayerOffsets[3]));

                velo = new Vector3(Mem.ReadFloat(aiBase - MainOffset + PlayerOffsets[4]),
                                   Mem.ReadFloat(aiBase - MainOffset + PlayerOffsets[5]),
                                   Mem.ReadFloat(aiBase - MainOffset + PlayerOffsets[6]));

                ai.Update(hp, pos, velo);
            }
        }
        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);
                }
            }
        }
 private void SaveCoords(int index)
 {
     teleCoords[index, 0] = mem.ReadFloat(player.pointerAddress + player.xPos);
     teleCoords[index, 1] = mem.ReadFloat(player.pointerAddress + player.yPos);
     teleCoords[index, 2] = mem.ReadFloat(player.pointerAddress + player.zPos);
 }
Exemple #8
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);
 }