Hi!
I want to learn how to read the memory of Conquer (later in the future i want to learn how to write aswell but i can figure that out later).
So what i need help with is this source i have found.
It's hard to find Conquer cheat sources which actually are written in Visual Basic.NET so thats why i took this Warcraft III example and i thought of using it to read from Conquer.
I ripped it and changed the process name from "war3" to "Conquer" and tried to use it right away but as you might think, it didn't work.
So if someone please can help me to use this code (or any other code) to read the memory to get access to things such as HP, [Mana], Stamina, EXP, and more basic stuff.
Thanks!
//Zeelia
I want to learn how to read the memory of Conquer (later in the future i want to learn how to write aswell but i can figure that out later).
So what i need help with is this source i have found.
It's hard to find Conquer cheat sources which actually are written in Visual Basic.NET so thats why i took this Warcraft III example and i thought of using it to read from Conquer.
I ripped it and changed the process name from "war3" to "Conquer" and tried to use it right away but as you might think, it didn't work.
So if someone please can help me to use this code (or any other code) to read the memory to get access to things such as HP, [Mana], Stamina, EXP, and more basic stuff.
Thanks!
//Zeelia
Code:
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Const PROCESS_ALL_ACCESS = &H1F0FFF
Public Sub GetName()
'From here too where I put END, is where its the same as above.
Try
Dim Address As Integer, vBuffer As Long
Dim enc As New System.Text.ASCIIEncoding
Dim myProcesses As Process() = Process.GetProcessesByName("war3")
If myProcesses.Length = 0 Then
Status.Text = "Warcraft III is not running."
Exit Sub
End If
Dim processHandle As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, myProcesses(0).Id)
If processHandle = IntPtr.Zero Then
Status.Text = "Failed to open Warcraft III process."
Exit Sub
End If
Address = 724
Do
ReadProcessMemory(processHandle, Address, vBuffer, 4, 0)
If vBuffer = 1463898675 Then
Me.Icon = My.Resources.ROC
NotifyIcon.Icon = My.Resources.ROC
Address -= 32
Exit Do
ElseIf vBuffer = 1462982736 Then
Me.Icon = My.Resources.TFT
NotifyIcon.Icon = My.Resources.TFT
Address -= 32
Exit Do
Else
Address += 65536
End If
Loop
'END
'Below this is what has changed from WriteName.
'We declare ret as a Byte Array. We declare it as an array by putting () after Byte.
Dim ret As Byte() = Nothing
'We make sure that the CurrentName textbox is nothing. That way when we are converting the integer to a string, we arent &='ing onto the textbox.
CurrentName.Text = ""
'We are now going to start our loop, increase the Address by 1 each time, and read the process memory.
For i As Integer = 0 To 15
'Read the memory.
ReadProcessMemory(processHandle, Address + i, vBuffer, 1, 0)
'Now we need to take vBuffer and get the bytes from it.
ret = BitConverter.GetBytes(vBuffer)
'Then convert ret to a readable string.
'Then we add the new string to the Current Name textbox.
CurrentName.Text &= System.Text.Encoding.ASCII.GetString(ret).Replace("RAW", "")
Next
'Then we close the process so warcraft III doesnt get any errors.
CloseHandle(processHandle)
'Then we need to let the user know that Warcraft III is running fine.
Status.Text = "Warcraft III is running."
Catch ex As Exception
'If we happen to get any errors, we will set the status label's text to the exceptions (error) (ex.message).
Status.Text = ex.Message
'Then we need to exit the sub so we dont get any more errors.
Exit Sub
End Try
End Sub
Quote:
You can find the whole source at:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]