I make program"SroProjekt" with friend and we have problem maybe any one know who is wrong ;/
Me program read hp from sro_client and i show it in labelZycie.text.
It is code C#:
Code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Runtime.InteropServices; i ready adress from Cheat Engine in Creed Online server Loki 80lv max namespace SroProjekt { public partial class Glowne : Form { public Glowne() { InitializeComponent(); } class Memory { [DllImport("kernel32.dll")] static extern IntPtr OpenProcess(UInt32 dwDesiredAccess, Boolean bInheritHandle, UInt32 dwProcessId); [DllImport("kernel32.dll")] static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, UIntPtr nSize, uint lpNumberOfBytesWritten); IntPtr Handle; //konstruktor public Memory(string sprocess) { Process[] Processes = Process.GetProcessesByName(sprocess); Process nProcess = Processes[0]; Handle = OpenProcess(0x10, false, (uint)nProcess.Id); } //Czytanie stringów public string ReadString(uint pointer) { byte[] bytes = new byte[24]; ReadProcessMemory(Handle, (IntPtr)pointer, bytes, (UIntPtr)24, 0); return Encoding.UTF8.GetString(bytes); } //Czytanie OffSetu public int ReadOffset(uint pointer, uint offset) { byte[] bytes = new byte[24]; uint adress = (uint)ReadPointer(pointer) + offset; ReadProcessMemory(Handle, (IntPtr)adress, bytes, (UIntPtr)sizeof(int), 0); return BitConverter.ToInt32(bytes, 0); } //Czytanie pointera public int ReadPointer(uint pointer) { byte[] bytes = new byte[24]; ReadProcessMemory(Handle, (IntPtr)pointer, bytes, (UIntPtr)sizeof(int), 0); return BitConverter.ToInt32(bytes, 0); } } private void Glowne_Load(object sender, EventArgs e) { //sprawdzanie stanu procesu Process[] tab = Process.GetProcessesByName("sro_client.exe"); if (tab.Length == 0) { labelCzyWlaczono.Text = "Włączony!"; } else { labelCzyWlaczono.Text = "Wyłączony!"; } } private void timer1_Tick(object sender, EventArgs e) { Memory mem = new Memory("sro_client"); int maxhp = mem.ReadPointer(0x00EEEDF0); labelZycie.Text = maxhp.ToString(); int hp = mem.ReadPointer(0x14A9E944); labelZycie.Text = hp.ToString(); } } }
how i can show hp in me program from silkroad