Thanks for your reply again..
This is my new code,
With this code of usage I get all values return by "0" , and I still didnt understand what means " pointer + anyoffset "
btw , this code has 0 errors but 14 warnings , all the same
it is "Using DirectCast to cast a value-type to the same type is obsolete.
ps . Forgive me for asking lot questions please :p
LAST EDIT : Idk , some of my friends has just told me this is easier ( I don't think anymore ) and for using multi clients it's better to use offsets and I prefer this way because one day it will be needed so I wanna learn.
This is my new code,
PHP Code:
Imports System.Text
Imports System.IO
Public Class Form1
Private Declare Function ReadProcessMemory Lib "kernel32.dll" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As Byte(), ByVal nSize As UIntPtr, ByRef lpNumberOfBytesWritten As UInteger) As Boolean
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim readHandle As IntPtr = Process.GetProcessesByName("SRO_Client")(0).MainWindowHandle
Dim bytes As Byte() = New Byte(23) {}
Dim rw As Integer = 0
//Pointer
ReadProcessMemory(readHandle, DirectCast(&HAA0E44, Integer), bytes, DirectCast(24, Integer), rw)
Dim pointer As Integer = BitConverter.ToInt32(bytes, 0)
//Charname
Dim charNameAddress As UInteger = &HA9FB98
ReadProcessMemory(readHandle, DirectCast(charNameAddress, UInteger), bytes, DirectCast(24, Integer), rw)
Label1.Text = Encoding.UTF8.GetString(bytes)
//Current HP
ReadProcessMemory(readHandle, DirectCast(pointer + &H3BC, Integer), bytes, DirectCast(24, Integer), rw)
Dim currHP As Integer = BitConverter.ToInt32(bytes, 0)
Label2.Text = currHP
//Maximal HP
ReadProcessMemory(readHandle, DirectCast(pointer + &H3B4, Integer), bytes, DirectCast(24, Integer), rw)
Dim maxHP As Integer = BitConverter.ToInt32(bytes, 0)
Label3.Text = maxHP
//Current MP
ReadProcessMemory(readHandle, DirectCast(pointer + &H3B0, Integer), bytes, DirectCast(24, Integer), rw)
Dim currMP As Integer = BitConverter.ToInt32(bytes, 0)
Label4.Text = currMP
//Maximal MP
ReadProcessMemory(readHandle, DirectCast(pointer + &H3B8, Integer), bytes, DirectCast(24, Integer), rw)
Dim maxMP As Integer = BitConverter.ToInt32(bytes, 0)
Label5.Text = maxMP
//Level
ReadProcessMemory(readHandle, DirectCast(pointer + &H7C8, Integer), bytes, DirectCast(24, Integer), rw)
Dim level As Byte = bytes(0)
Label6.Text = level
End Sub
End Class
btw , this code has 0 errors but 14 warnings , all the same
it is "Using DirectCast to cast a value-type to the same type is obsolete.
ps . Forgive me for asking lot questions please :p
LAST EDIT : Idk , some of my friends has just told me this is easier ( I don't think anymore ) and for using multi clients it's better to use offsets and I prefer this way because one day it will be needed so I wanna learn.