Say Ive got the following C# Code to read the memory based on offsets, why does it return 0000 (should be maximum health) , what am I doing wrong?
Reading static offsets works just fine, my memory reading class is not the problem.
Code:private void button1_Click(object sender, EventArgs e) { Process[] m_p = Process.GetProcessesByName("WoW"); if (m_p[0] != null) { ProcessMemoryReader pmr = new ProcessMemoryReader(); pmr.ReadProcess = m_p[0]; pmr.OpenProcess(); long offset = 0xA560; richTextBox1.AppendText("Base adress: "+pmr.ReadProcess.MainModule.BaseAddress.ToInt64().ToString("x")+"n"); richTextBox1.AppendText("Offset :" + offset.ToString("x") + "n"); long id = pmr.ReadProcess.MainModule.BaseAddress.ToInt64() + offset; richTextBox1.AppendText("Offset+Base: " + id.ToString("x")+"n"); int readb; byte[] bytes = pmr.ReadProcessMemory((IntPtr)id, 4,out readb); string str = ""; foreach (byte b in bytes) str += b; richTextBox1.AppendText("Bytes read: "+readb.ToString("x")+"nData read: "+str+"n"); richTextBox1.ScrollToCaret(); pmr.CloseHandle(); } }
Could anyone find the target X,Y,Z,health,mana etc.. offsets? If not could someone point me in the direction so I can find them and share?
This would be crucial information when writing a bot.
Thanks!
p.s. I'm not great with memory offsets but I'm one hell of a coder
Scan scan scan for them...
i am getting: pmr.ReadProcess.MainModule.BaseAddress = 'pmr.ReadProcess.MainModule' threw an exception of type 'System.ComponentModel.Win32Exception' - Access is denied
any idea what's wrong?
Your program isn't allowed to read in memory ?
I also tried something like this, but always gett 0 results.. I'm using visual studio 2008
Code:uint bytes = Convert.ToUInt32(tx_bytes.Text.Trim(),10); int address = Convert.ToInt32(tx_address.Text.Trim(), 16); String processName = tx_process.Text.Trim(); ProcessMemoryReader pReader = new ProcessMemoryReader(); System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcessesByName(processName); if (myProcesses.Length == 0) { MessageBox.Show("Process " + processName + " found!"); return; } pReader.ReadProcess = myProcesses[0]; // open process in read memory mode pReader.OpenProcess(); byte[] memory; int bytesReaded; memory = pReader.ReadProcessMemory((IntPtr)address, bytes, out bytesReaded); int value = memory[0]; tx_value.Text = value.ToString();
Last edited by dragospt; 12-01-2007 at 12:31 PM. Reason: code change
@tttommeke: I tried using hypnodok code for winmine (minesweepr windows game) and i didnt got any error, but when swishing to WoW, denied appeared. i don't understand why..
Is getting very frustrating, because i want to work on a bot and fail read data from memory
You really should not use my code because I have absolutely no clue what Im doing.
It works fine for reading static pointers but the way I calculate offsets is probably just straight up rubbish.
If anyone could point me and the others in this thread to the right direction I would very much appreciate it.
i found Dynamic Z using TSearch @ A698BF0, next found dynamic health @ A69A548.
so i located base address by doing dynamic z - 0xBF0 which yields A698000 but to get to the dynamic health offset it wasn't 0xA548 it was 0x2548. has this changed or am i doing some wrong math here?
It could be changed, not tested myself.
Just tested on 2 clients, looks like health, mana and the other offsets beginging with A have changed into 2.
Also found 0x3268 which is Experience.
Still on the hunt for target base offset, target level, target health, etc..
Target base, from target base -0x8 + 0x{HPOffset}, you can't find trough the player his target hp, you need to do it from the mob itself.
Last edited by Froogle; 12-10-2007 at 06:05 PM.
Hey Froogle, thanks for the reply! I see my error now and what I did was just one of those coding.. gotchas!
I was doing 0xA698000 + 0xA548 which came out totally wrong.
Just want to note to anyone else who ran into this issue that 0xA698000 is not the same as A698000. lol, thanks!