📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "剑侠补血器Ver1.0"
ClientHeight = 5715
ClientLeft = 7335
ClientTop = 4050
ClientWidth = 2655
LinkTopic = "Form1"
ScaleHeight = 5715
ScaleWidth = 2655
Begin VB.Timer Timer6
Interval = 30000
Left = 720
Top = 2640
End
Begin VB.Timer Timer5
Interval = 5000
Left = 720
Top = 2640
End
Begin VB.Timer Timer4
Interval = 5000
Left = 720
Top = 2640
End
Begin VB.Timer Timer3
Interval = 5000
Left = 720
Top = 2640
End
Begin VB.Timer Timer2
Interval = 500
Left = 720
Top = 2640
End
Begin VB.Timer Timer1
Interval = 1000
Left = 1680
Top = 3960
End
Begin VB.TextBox Text4
Height = 270
Left = 1200
TabIndex = 8
Text = "0"
Top = 1200
Width = 495
End
Begin VB.TextBox Text3
Height = 270
Left = 1200
TabIndex = 7
Text = "200"
Top = 840
Width = 495
End
Begin VB.TextBox Text2
Height = 270
Left = 1200
TabIndex = 6
Text = "0"
Top = 480
Width = 495
End
Begin VB.TextBox Text1
Height = 270
Left = 1200
TabIndex = 5
Text = "500"
Top = 120
Width = 495
End
Begin VB.CheckBox Check5
Caption = "每隔30秒按""V""键一次"
Height = 495
Left = 120
TabIndex = 4
Top = 1440
Value = 1 'Checked
Width = 2535
End
Begin VB.CheckBox Check4
Caption = "生命小于"
Height = 495
Left = 120
TabIndex = 3
Top = 1080
Width = 1215
End
Begin VB.CheckBox Check3
Caption = "生命小于"
Height = 495
Left = 120
TabIndex = 2
Top = 360
Width = 1215
End
Begin VB.CheckBox Check2
Caption = "内力小于"
Height = 495
Left = 120
TabIndex = 1
Top = 720
Value = 1 'Checked
Width = 1215
End
Begin VB.CheckBox Check1
Caption = "生命小于"
Height = 495
Left = 120
TabIndex = 0
Top = 0
Value = 1 'Checked
Width = 1215
End
Begin VB.Label Label11
Height = 255
Left = 120
TabIndex = 19
Top = 5400
Width = 1215
End
Begin VB.Label Label10
Height = 180
Left = 720
TabIndex = 18
Top = 2880
Width = 1695
End
Begin VB.Label Label9
Height = 180
Left = 720
TabIndex = 17
Top = 2520
Width = 1695
End
Begin VB.Label Label8
Height = 180
Left = 720
TabIndex = 16
Top = 2160
Width = 1695
End
Begin VB.Label Label7
Caption = "体力:"
Height = 180
Left = 120
TabIndex = 15
Top = 2880
Width = 540
End
Begin VB.Label Label6
Caption = "内力:"
Height = 180
Left = 120
TabIndex = 14
Top = 2520
Width = 540
End
Begin VB.Label Label5
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000016&
Caption = "生命:"
ForeColor = &H80000008&
Height = 180
Left = 120
TabIndex = 13
Top = 2160
Width = 540
End
Begin VB.Label Label4
Caption = "按“3”键"
Height = 255
Left = 1800
TabIndex = 12
Top = 1200
Width = 855
End
Begin VB.Label Label3
Caption = "按“2”键"
Height = 255
Left = 1800
TabIndex = 11
Top = 840
Width = 855
End
Begin VB.Label Label2
Caption = "按“1”键"
Height = 255
Left = 1800
TabIndex = 10
Top = 480
Width = 855
End
Begin VB.Label Label1
Caption = "按“1”键"
Height = 255
Left = 1800
TabIndex = 9
Top = 120
Width = 855
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DiZhi As Long
Dim SEThp1 As Long
Dim SEThp2 As Long
Dim SEThp3 As Long
Dim SETmp As Long
Private Function ncnr(lpADDress As Long) As Long
' 声明一些需要的变量
Dim hwnd As Long ' 储存 FindWindow 函数返回的句柄
Dim pid As Long ' 储存进程标识符( Process Id )
Dim pHandle As Long ' 储存进程句柄
hwnd = FindWindow(vbNullString, "剑侠情缘·网络版")
' 取得进程标识符
GetWindowThreadProcessId hwnd, pid
' 使用进程标识符取得进程句柄
pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
' 在内存地址中读取数据
ReadProcessMemory pHandle, lpADDress, ByVal VarPtr(ncnr), 4, 0&
' 关闭进程句柄
CloseHandle hProcess
End Function
Private Sub Form_Load()
DiZhi = &H3F08800
Timer1.Enabled = True
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
Timer5.Enabled = False
Timer6.Enabled = False
End Sub
Private Sub Timer1_Timer()
Dim hwnd As Long
hwnd = FindWindow(vbNullString, "剑侠情缘·网络版")
If hwnd = 0 Then
Label11.Caption = "游戏未加载"
Timer1.Enabled = True
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
Timer5.Enabled = False
Timer6.Enabled = False
Exit Sub
End If
Label11.Caption = "游戏已加载"
Timer2.Enabled = True
SEThp1 = Text1.Text
SEThp2 = Text2.Text
SETmp = Text3.Text
SEThp3 = Text4.Text
Timer2.Enabled = True
If Check5.Value Then
Timer6.Enabled = True
End If
End Sub
Private Sub Timer2_Timer()
Dim NowHp As Long
Dim NowMp As Long
NowHp = ncnr(DiZhi)
NowMp = ncnr(DiZhi + 12)
Label8.Caption = Str(NowHp) + "/" + Str(ncnr(DiZhi + 4))
Label9.Caption = Str(NowMp) + "/" + Str(ncnr(DiZhi + 16))
Label10.Caption = Str(ncnr(DiZhi + 24)) + "/" + Str(ncnr(DiZhi + 28))
If (NowHp) < SEThp1 And Check1.Value And Timer3.Enabled = False Then
SendKeys "1"
Timer3.Enabled = True
End If
If (NowHp) < SEThp2 And Check1.Value And Timer4.Enabled = False Then
SendKeys "1"
Timer4.Enabled = True
End If
If (NowMp) < SETmp And Check1.Value And Timer5.Enabled = False Then
SendKeys "2"
Timer5.Enabled = True
End If
If (NowHp) < SEThp3 And Check1.Value Then
SendKeys "3"
End If
End Sub
Private Sub Timer3_Timer()
Timer3.Enabled = False
End Sub
Private Sub Timer4_Timer()
Timer4.Enabled = False
End Sub
Private Sub Timer5_Timer()
Timer5.Enabled = False
End Sub
Private Sub Timer6_Timer()
sendkey "v"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -