1,488
社区成员
发帖
与我相关
我的任务
分享
Private Sub Timer1_Timer()'interval设置200 每200毫秒去读它
Gamehwnd1 = FindWindow(vbNullString, "Maplestory")
GetWindowThreadProcessId Gamehwnd1, ID
hProces1 = OpenProcess(PROCESS_ALL_ACCESS, False, ID)
If (Gamehwnd1 = 0) Then
Else
ReadProcessMemory hProces1, ByVal &H99D620, di, 4, 0&
If di <> 0 Then'因为害怕她变为0
Label3.Caption = di
End If
End If
End Sub
Private Sub Check1_Click()
u =val(Label3.Caption)'把Label3.Caption的数值赋值给u
Gamehwnd1 = FindWindow(vbNullString, "Maplestory")
GetWindowThreadProcessId Gamehwnd1, ID
hProces1 = OpenProcess(PROCESS_ALL_ACCESS, False, ID)
If (Gamehwnd1 = 0) Then
Else
If Check1.Value = 1 Then
WriteProcessMemory hProces1, ByVal &H99D620, 0, 4, 0&'写4个字节的0给&H99D620 只要写4个字节的0就实现功能.
Else
WriteProcessMemory hProces1, ByVal &H99D620, u, 4, 0&'check1.vaule=0的时候 把刚才读到的u写到&H99D620里
End If
End If
End Sub