?? form1.frm
字號:
Left = 960
TabIndex = 13
Text = "150"
Top = 690
Width = 750
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "Form1.frx":030A
Left = 1755
List = "Form1.frx":0350
Style = 2 'Dropdown List
TabIndex = 12
Top = 255
Width = 735
End
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "Form1.frx":03A5
Left = 1755
List = "Form1.frx":03EB
Style = 2 'Dropdown List
TabIndex = 11
Top = 690
Width = 735
End
Begin VB.CheckBox Check1
Caption = "血保護"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 90
TabIndex = 10
Top = 300
Width = 900
End
Begin VB.CheckBox Check2
Caption = "藍保護"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 90
TabIndex = 9
Top = 735
Width = 900
End
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "2006.7.22"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 180
Left = 1875
TabIndex = 17
Top = 4845
Width = 810
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Const VK_0 As Long = 48
Private Const VK_1 As Long = 49
Private Const VK_2 As Long = 50
Private Const VK_3 As Long = 51
Private Const VK_4 As Long = 52
Private Const VK_5 As Long = 53
Private Const VK_6 As Long = 54
Private Const VK_7 As Long = 55
Private Const VK_8 As Long = 56
Private Const VK_9 As Long = 57
Private Const VK_F1 As Long = &H70
Private Const VK_F2 As Long = &H71
Private Const VK_F3 As Long = &H72
Private Const VK_F4 As Long = &H73
Private Const VK_F5 As Long = &H74
Private Const VK_F6 As Long = &H75
Private Const VK_F7 As Long = &H76
Private Const VK_F8 As Long = &H77
Private Const VK_F9 As Long = &H78
Private Const VK_F10 As Long = &H79
Private Const VK_F11 As Long = &H7A
Private Const VK_F12 As Long = &H7B
Private Hwndfw As Long
Private pHandle As Long
Private Wtxt As String * 50
Private Dz As Long
Private Gdz As Long
Private Mdz As Long
Private Rjz As Long
Private Rpy As Long
Private Gjz As Long
Private Wz As String * 20
Private Na As String * 20
Private H1 As Long
Private H2 As Long
Private L1 As Long
Private L2 As Long
Private J1 As Long
Private J2 As Long
Private Rx As Long
Private Ry As Long
Private GNa As String * 20
Private GH1 As Long
Private GH2 As Long
Private GzbX As Long
Private GzbY As Long
Private Dq As ComboBox
Function GetFromINI(AppName As String, KeyName As String, FileName As String) As String
Dim RetStr As String
RetStr = String(255, Chr(0))
GetFromINI = Left(RetStr, GetPrivateProfileString(AppName, ByVal KeyName, "", RetStr, Len(RetStr), FileName))
End Function
Private Sub Chiyao() '吃藥
AppActivate Wtxt '激活游戲窗口
Select Case Dq.Text
Case "0"
Call keybd_event(VK_0, 0, 0, 0)
Sleep 300
Call keybd_event(VK_1, 0, KEYEVENTF_KEYUP, 0)
Case "1"
Call keybd_event(VK_1, 0, 0, 0)
Sleep 300
Call keybd_event(VK_1, 0, KEYEVENTF_KEYUP, 0)
Case "2"
Call keybd_event(VK_2, 0, 0, 0)
Sleep 300
Call keybd_event(VK_2, 0, KEYEVENTF_KEYUP, 0)
Case "3"
Call keybd_event(VK_3, 0, 0, 0)
Sleep 300
Call keybd_event(VK_3, 0, KEYEVENTF_KEYUP, 0)
Case "4"
Call keybd_event(VK_4, 0, 0, 0)
Sleep 300
Call keybd_event(VK_4, 0, KEYEVENTF_KEYUP, 0)
Case "5"
Call keybd_event(VK_5, 0, 0, 0)
Sleep 300
Call keybd_event(VK_5, 0, KEYEVENTF_KEYUP, 0)
Case "6"
Call keybd_event(VK_6, 0, 0, 0)
Sleep 300
Call keybd_event(VK_6, 0, KEYEVENTF_KEYUP, 0)
Case "7"
Call keybd_event(VK_7, 0, 0, 0)
Sleep 300
Call keybd_event(VK_7, 0, KEYEVENTF_KEYUP, 0)
Case "8"
Call keybd_event(VK_8, 0, 0, 0)
Sleep 300
Call keybd_event(VK_8, 0, KEYEVENTF_KEYUP, 0)
Case "9"
Call keybd_event(VK_9, 0, 0, 0)
Sleep 300
Call keybd_event(VK_9, 0, KEYEVENTF_KEYUP, 0)
Case "F1"
Call keybd_event(VK_F1, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F1, 0, KEYEVENTF_KEYUP, 0)
Case "F2"
Call keybd_event(VK_F2, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F2, 0, KEYEVENTF_KEYUP, 0)
Case "F3"
Call keybd_event(VK_F3, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F3, 0, KEYEVENTF_KEYUP, 0)
Case "F4"
Call keybd_event(VK_F4, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0)
Case "F5"
Call keybd_event(VK_F5, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F5, 0, KEYEVENTF_KEYUP, 0)
Case "F6"
Call keybd_event(VK_F6, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F6, 0, KEYEVENTF_KEYUP, 0)
Case "F7"
Call keybd_event(VK_F7, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F7, 0, KEYEVENTF_KEYUP, 0)
Case "F8"
Call keybd_event(VK_F8, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F8, 0, KEYEVENTF_KEYUP, 0)
Case "F9"
Call keybd_event(VK_F9, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F9, 0, KEYEVENTF_KEYUP, 0)
Case "F10"
Call keybd_event(VK_F10, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F10, 0, KEYEVENTF_KEYUP, 0)
Case "F11"
Call keybd_event(VK_F11, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F11, 0, KEYEVENTF_KEYUP, 0)
Case "F12"
Call keybd_event(VK_F12, 0, 0, 0)
Sleep 300
Call keybd_event(VK_F12, 0, KEYEVENTF_KEYUP, 0)
End Select
End Sub
Private Sub Form_Load()
Dim pid As Long
Hwndfw = FindWindow("zhengtu_client", vbNullString) '取得目標窗口的句柄
If (Hwndfw = 0) Then
MsgBox "游戲沒找到,請先進入游戲。"
End
End If
GetWindowText Hwndfw, Wtxt, 50 '取得窗口標題
GetWindowThreadProcessId Hwndfw, pid '取得進程標識符
pHandle = OpenProcess(PROCESS_VM_READ + PROCESS_QUERY_INFORMATION, False, pid) '取得進程句柄'
Timer1.Enabled = True '開啟時鐘
Combo1.Text = "1"
Combo2.Text = "2"
Mdz = Val("&H" & GetFromINI("Setup", "地圖地址", App.Path + "\地址.ini"))
Rjz = Val("&H" & GetFromINI("Setup", "人物基址", App.Path + "\地址.ini"))
Rpy = Val("&H" & GetFromINI("Setup", "人物偏移", App.Path + "\地址.ini"))
Gjz = Val("&H" & GetFromINI("Setup", "目標基址", App.Path + "\地址.ini"))
If Mdz = 0 Or Rjz = 0 Or Gjz = 0 Then
MsgBox "數(shù)據(jù)錯誤,請保證當前目錄下有【征途超強搜索】生成的【地址.ini】文件。"
Unload Me
End
End If
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE '總在最前面
End Sub
Private Sub Timer1_Timer()
If Check4.Value = 1 Then '血條位置控制
Dim TL As POINTAPI
Dim HW As RECT
ClientToScreen Hwndfw, TL
GetClientRect Hwndfw, HW
If Check5.Value = 1 Then
Form2.Top = (TL.y + 15) * 15
Form2.Left = (TL.x + HW.Right / 2) * 15 - Form2.Width / 2
Else
Form2.Top = (TL.y + (HW.Bottom / 2)) * 15 - 1850
Form2.Left = (TL.x + HW.Right / 2) * 15 - Form2.Width / 2
End If
End If
ReadProcessMemory pHandle, Mdz, Wz, 20, 0& '讀人物位置
ReadProcessMemory pHandle, Mdz + &H110, VarPtr(Dz), 8, 0& '讀玩家數(shù)據(jù)基址
ReadProcessMemory pHandle, Dz + &H4, Na, 20, 0& '讀當人物名稱1
ReadProcessMemory pHandle, Dz + Rpy + &H4C6, VarPtr(H1), 4, 0& '讀取當前血量
If H1 < Val(Text10.Text) And Check1.Value = 1 Then '吃紅判斷
Set Dq = Form1.Combo1
Chiyao
End If
ReadProcessMemory pHandle, Dz + Rpy + &H4CA, VarPtr(H2), 4, 0& '讀取最大血量
ReadProcessMemory pHandle, Dz + Rpy + &H4D2, VarPtr(L1), 4, 0& '讀取當前魔法
If L1 < Val(Text11.Text) And Check2.Value = 1 Then '吃藍判斷
Set Dq = Form1.Combo2
Chiyao
End If
ReadProcessMemory pHandle, Dz + Rpy + &H4D6, VarPtr(L2), 4, 0& '讀取最大魔法
ReadProcessMemory pHandle, Dz + Rpy + &H502, VarPtr(J1), 4, 0& '讀取當前經(jīng)驗
ReadProcessMemory pHandle, Dz + Rpy + &H50A, VarPtr(J2), 4, 0& '讀取最大經(jīng)驗
ReadProcessMemory pHandle, Dz + Rpy + &H248, VarPtr(Rx), 4, 0& '讀取X坐標
ReadProcessMemory pHandle, Dz + Rpy + &H24C, VarPtr(Ry), 4, 0& '讀取Y坐標
ReadProcessMemory pHandle, Gjz, VarPtr(Gdz), 4, 0& '讀取怪物基址
If ReadProcessMemory(pHandle, Gdz + &H4, GNa, 20, 0&) = 0 Then GNa = "沒有目標" '怪名稱"
If ReadProcessMemory(pHandle, Gdz + &H40, VarPtr(GH1), 4, 0&) = 0 Then GH1 = 0 '怪當前血
If ReadProcessMemory(pHandle, Gdz + &H44, VarPtr(GH2), 4, 0&) = 0 Then GH2 = 0 '怪最大血
If ReadProcessMemory(pHandle, Gdz + &H2C, VarPtr(GzbX), 4, 0&) = 0 Then GzbX = 0 '怪當X坐標
If ReadProcessMemory(pHandle, Gdz + &H30, VarPtr(GzbY), 4, 0&) = 0 Then GzbY = 0 '怪最Y坐標
Label10.Caption = Trim(Na)
Label9.Caption = J1 & " / " & J2
Label6.Caption = H1 & " / " & H2
Label7.Caption = L1 & " / " & L2
Label19.Caption = Rx & ":" & Ry
Label15.Caption = Trim(Wz)
Label11.Caption = Trim(GNa)
Label13.Caption = GH1 & " / " & GH2
Label17.Caption = GzbX & ":" & GzbY
If Check4.Value = 1 Then Form2.Shape1.Width = (H1 / H2) * Form2.Width + 30 '血條血量控制
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then
SetWindowPos Form1.hwnd, -1, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
Else
SetWindowPos Form1.hwnd, -2, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End If
SetWindowPos Form2.hwnd, -1, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
Private Sub Check4_Click()
If Check4.Value = 1 Then
Check5.Enabled = True
Form2.Visible = True
Else
Check5.Enabled = False
Form2.Visible = False
End If
End Sub
Private Sub Check5_Click()
If Check5.Value = 1 Then
Form2.Height = 300
Form2.Width = 6000
Else
Form2.Height = 90
Form2.Width = 900
End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
ReleaseCapture
SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End Sub
Private Sub Form_Unload(Cancel As Integer)
CloseHandle pHandle '關(guān)閉進程句柄
Unload Form2
Unload Me
End
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -