I'm used to programming for a game called Tibia and in it I use a couple simple scripts, one of these scripts is this:
Anyways, how would I adjust this to Conquer?
Also, reading is like this:
Same question, yes I'm very new here, but it's just these that I'm suffereing with here.
(If this is the wrong thread feel free to move it~)
~Chanceler~
Code:
Public Function Tibia_Hwnd() Dim tibiaclient As Long tibiaclient = FindWindow("tibiaclient", vbNullString) 'Return hwnd to function Tibia_Hwnd = tibiaclient End Function
Also, reading is like this:
Code:
Public Function Memory_ReadLong(windowHwnd As Long, Address As Long) As Long
' Declare some variables we need
Dim pid As Long ' Used to hold the Process Id
Dim phandle As Long ' Holds the Process Handle
Dim valbuffer As Long ' Long
' First get a handle to the "game" window
If (windowHwnd = 0) Then Exit Function
' We can now get the pid
GetWindowThreadProcessId windowHwnd, pid
' Use the pid to get a Process Handle
phandle = OpenProcess(PROCESS_VM_READ, False, pid)
If (phandle = 0) Then Exit Function
' Read Long
ReadProcessMemory phandle, Address, valbuffer, 4, 0&
' Return
Memory_ReadLong = valbuffer
' Close the Process Handle
CloseHandle phandle
End Function
(If this is the wrong thread feel free to move it~)
~Chanceler~