|
|
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
Begin VB.Form form1
Caption = "放逐 v 0.57 Build 0917"
ClientHeight = 2910
ClientLeft = 60
ClientTop = 450
ClientWidth = 4845
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 2910
ScaleWidth = 4845
StartUpPosition = 2 '屏幕中心
Begin TabDlg.SSTab SSTab1
Height = 2895
Left = 0
TabIndex = 0
Top = 0
Width = 4815
_ExtentX = 8493
_ExtentY = 5106
_Version = 393216
TabHeight = 520
TabCaption(0) = "基本"
TabPicture(0) = "Form1.frx":0CCA
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "Frame1"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
TabCaption(1) = "挂机"
TabPicture(1) = "Form1.frx":0CE6
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "Frame2"
Tab(1).ControlCount= 1
TabCaption(2) = "技能"
TabPicture(2) = "Form1.frx":0D02
Tab(2).ControlEnabled= 0 'False
Tab(2).Control(0)= "Frame3"
Tab(2).ControlCount= 1
Begin VB.Frame Frame3
Height = 2415
Left = -74880
TabIndex = 13
Top = 360
Width = 4575
Begin VB.CheckBox Check1
Caption = "F1"
Height = 255
Left = 120
TabIndex = 18
Top = 600
Width = 495
End
Begin VB.CheckBox Check2
Caption = "F2"
Height = 255
Left = 120
TabIndex = 17
Top = 960
Width = 495
End
Begin VB.CheckBox Check5
Caption = "F5"
Height = 255
Left = 120
TabIndex = 16
Top = 2040
Width = 495
End
Begin VB.CheckBox Check4
Caption = "F4"
Height = 495
Left = 120
TabIndex = 15
Top = 1560
Width = 495
End
Begin VB.CheckBox Check3
Caption = "F3"
Height = 495
Left = 120
TabIndex = 14
Top = 1200
Width = 495
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "使用技能:"
Height = 180
Left = 120
TabIndex = 19
Top = 360
Width = 810
End
End
Begin VB.Frame Frame2
Height = 2415
Left = -74880
TabIndex = 9
Top = 360
Width = 4575
Begin VB.TextBox Text9
Height = 270
Left = 960
TabIndex = 38
Text = "800"
Top = 960
Width = 615
End
Begin VB.TextBox Text8
Height = 270
Left = 3120
TabIndex = 33
Text = "50"
Top = 960
Width = 495
End
Begin VB.TextBox Text7
Height = 270
Left = 3120
TabIndex = 30
Top = 600
Width = 975
End
Begin VB.CheckBox Check6
Caption = "定点 X"
Height = 255
Left = 2160
TabIndex = 29
Top = 240
Width = 975
End
Begin VB.TextBox Text6
Height = 270
Left = 960
TabIndex = 28
Text = "500"
Top = 600
Width = 615
End
Begin VB.TextBox Text5
Height = 270
Left = 960
TabIndex = 24
Text = "50"
Top = 2040
Width = 375
End
Begin VB.TextBox Text3
Height = 270
Left = 960
TabIndex = 11
Text = "500"
Top = 240
Width = 615
End
Begin VB.TextBox Text4
Height = 270
Left = 3120
TabIndex = 10
Top = 240
Width = 975
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "出招间隔"
Height = 180
Left = 120
TabIndex = 37
Top = 960
Width = 720
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "范围"
Height = 180
Left = 2640
TabIndex = 32
Top = 960
Width = 360
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "Y"
Height = 180
Left = 2880
TabIndex = 31
Top = 600
Width = 90
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "拾取间隔"
Height = 180
Left = 120
TabIndex = 27
Top = 600
Width = 720
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "次,重新选怪"
Height = 180
Left = 1440
TabIndex = 25
Top = 2040
Width = 990
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "选怪失败"
Height = 180
Left = 120
TabIndex = 23
Top = 2040
Width = 720
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "选怪间隔"
Height = 180
Left = 120
TabIndex = 12
Top = 240
Width = 720
End
End
Begin VB.Frame Frame1
Caption = "角色名"
Height = 2415
Left = 120
TabIndex = 1
Top = 360
Width = 4575
Begin VB.CheckBox Check7
Caption = "普通攻击"
Height = 255
Left = 240
TabIndex = 36
Top = 2040
Value = 1 'Checked
Width = 1095
End
Begin VB.OptionButton Option2
Caption = "打坐"
Height = 255
Left = 1800
TabIndex = 35
Top = 1560
Value = -1 'True
Width = 735
End
Begin VB.OptionButton Option1
Caption = "吃药"
Enabled = 0 'False
Height = 255
Left = 1800
TabIndex = 34
Top = 1080
Width = 735
End
Begin VB.CommandButton Command4
Caption = "报警测试"
Height = 375
Left = 3360
TabIndex = 26
Top = 1440
Width = 975
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 3360
TabIndex = 22
Top = 1920
Width = 975
End
Begin VB.CommandButton Command3
Caption = "窗口置顶"
Height = 375
Left = 3360
TabIndex = 21
Top = 720
Width = 975
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 375
Left = 3360
TabIndex = 20
Top = 240
Width = 975
End
Begin VB.TextBox Text1
Height = 270
Left = 960
TabIndex = 3
Text = "550"
Top = 1080
Width = 615
End
Begin VB.TextBox Text2
Height = 270
Left = 960
TabIndex = 2
Text = "250"
Top = 1560
Width = 615
End
Begin VB.Timer Timer1
Interval = 800
Left = 2760
Top = 600
End
Begin VB.Timer Timer2
Enabled = 0 'False
Interval = 1000
Left = 2760
Top = 1080
End
Begin VB.Timer Timer3
Enabled = 0 'False
Interval = 1000
Left = 2760
Top = 1560
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "生命值"
Height = 180
Left = 240
TabIndex = 8
Top = 360
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "法力值"
Height = 180
Left = 240
TabIndex = 7
Top = 720
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "生命低于"
Height = 180
Left = 240
TabIndex = 6
Top = 1080
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "法力低于"
Height = 180
Left = 240
TabIndex = 5
Top = 1560
Width = 720
End
Begin VB.Label Label9
AutoSize = -1 'True
Height = 180
Left = 1560
TabIndex = 4
Top = 2880
Width = 90
End
End
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function SelectFunc Lib "zxdll.dll" (ByVal hWnd As Long, ByVal id As Long) As Long
Private Declare Function NormalAttackFunc Lib "zxdll.dll" (ByVal hWnd As Long) As Long
Private Declare Function ZazenFunc Lib "zxdll.dll" (ByVal hWnd As Long) As Long
Private Declare Function UnZazenFunc Lib "zxdll.dll" (ByVal hWnd As Long) As Long
Private Declare Function PickFunc Lib "zxdll.dll" (ByVal hWd As Long, ByVal ID1 As Long, ByVal ID2 As Long) As Long
Const PROCESS_ALL_ACCESS = &H1F0FFF
Private Declare Function GetTickCount Lib "kernel32" () As Long
Public xg As Long
Public dz As Long
Function Float2Int(Ans As Single) As Long '浮点转整形
CopyMemory Float2Int, Ans, 4
End Function
Private Sub Check6_Click()
If Check6.Value = 1 Then
Timer3.Enabled = True
Else
Timer3.Enabled = False
End If
End Sub
Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer2.Enabled = True
Timer3.Enabled = True
'Timer4.Enabled = True
Command1.Caption = "停止"
Else
Command1.Caption = "开始"
Timer2.Enabled = False
Timer3.Enabled = False
'Timer4.Enabled = False
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
If Command3.Caption = "窗口置顶" Then
Call SetWindowPos(Me.hWnd, -1, 0, 0, 0, 0, 3)
Command3.Caption = "取消置顶"
Else
Call SetWindowPos(Me.hWnd, -2, 0, 0, 0, 0, 3)
Command3.Caption = "窗口置顶"
End If
End Sub
Private Sub Command4_Click()
Form2.Show
End Sub
Private Sub Command5_Click()
Call Pick
End Sub
Private Sub Text3_Change()
Timer2.Interval = Val(Text3.Text)
End Sub
Private Sub Timer1_Timer()
Dim pid As Long
Dim hWd As Long
Dim hProcess As Long
Dim base As Long '存放人物基地址
Dim hp As Long '存储生命值
Dim mp As Long '存储真气值
Dim hpmax As Long
Dim mpmax As Long '存储真气最大值
Dim name(31) As Byte '存放人名字符串
Dim name_temp As Long '存放人物值
Dim Lv As Long
Dim DT As Long
Dim now As Long
Dim RX As Single
Dim RY As Single
hWd = FindWindow("zElementClient Window", "Element Client")
GetWindowThreadProcessId hWd, pid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
If hProcess = 0 Then
MsgBox "游戏未运行"
Unload Me
Exit Sub
End If
ReadProcessMemory hProcess, ByVal &H91A64C, base, 4, 0&
ReadProcessMemory hProcess, ByVal base + &H28, base, 4, 0& '得到为人物基地址
ReadProcessMemory hProcess, ByVal base + &H254, hp, 4, 0& '得到生命值
ReadProcessMemory hProcess, ByVal base + &H26C, hpmax, 4, 0& '得到生命最大值
ReadProcessMemory hProcess, ByVal base + &H258, mp, 4, 0& '得到真气值
ReadProcessMemory hProcess, ByVal base + &H270, mpmax, 4, 0& '得到真气最大值
ReadProcessMemory hProcess, ByVal base + &H24C, Lv, 4, 0& '等级
ReadProcessMemory hProcess, ByVal base + &H3D8, RX, 4, 0& 'x
ReadProcessMemory hProcess, ByVal base + &H3E0, RY, 4, 0& 'y
ReadProcessMemory hProcess, ByVal base + &H7C0, now, 4, 0& '当前是否选中目标
ReadProcessMemory hProcess, ByVal base + &H3A4, name_temp, 4, 0& '得到人名的值
ReadProcessMemory hProcess, ByVal name_temp, name(0), 32, 0& '转换字符串
ReadProcessMemory hProcess, ByVal &H91CA1C, DT, 4, 0& '答题
If DT <> 0 Then
Form2.Show
End If
Frame1.Caption = name
Label1.Caption = "生命值:" & hp & "/" & hpmax '显示生命值
Label2.Caption = "真气值:" & mp & "/" & mpmax '显示真气值
If (hp < Val(Text1.Text) Or mp < Val(Text2.Text)) And now = 0 And Option2.Value = True And dz = 0 Then
Call ZazenFunc(hWd)
dz = 1
End If
If hp = hpmax And mp = mpmax And dz = 1 Then
Call UnZazenFunc(hWd)
dz = 0
End If
If Check6.Value = 0 Then
Text4.Text = RX
Text7.Text = RY
End If
CloseHandle (hProcess)
End Sub
Private Sub Timer2_Timer()
Call ZhaoG
Call Pick
End Sub
Sub ZhaoG()
Dim i As Long
Dim GwNameb(63) As Byte
Dim hWd As Long
Dim pid As Long
Dim hProcess As Long
Dim ECXI As Long
Dim eax As Long
Dim tmp1 As Long
Dim tmp2 As Long
Dim GwSL As Long
Dim GwHp As Long
Dim GwHPMAX As Long
Dim GwLv As Long
Dim GwX As Single
Dim GwY As Single
Dim GwJl As Single
Dim GwClass As Long
Dim GWID As Long
Dim gwid1 As Long
Dim GwName As String
Dim GwZl As Long
Dim ecx2 As Long '存放2级基址
Dim GWJL1 As Single
Dim IDt(200) As Long
Dim JLt(200) As Single
Dim o As Long
Dim p As Long
Dim t1 As Single
Dim t2 As Long
Dim XX As Single
Dim YY As Single
t = 0
hWd = FindWindow("ZElementClient Window", "Element Client")
GetWindowThreadProcessId hWd, pid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
If dz = 1 Then
Exit Sub
End If
ReadProcessMemory hProcess, ByVal &H91A64C, ECXI, 4, 0
ReadProcessMemory hProcess, ByVal ECXI + &H28, ecx2, 4, 0 '获取2级基址
ReadProcessMemory hProcess, ByVal ECXI + &H8, eax, 4, 0 '获取周围环境
ReadProcessMemory hProcess, ByVal eax + &H20, ECXI, 4, 0 '获取周围怪物基地址
ReadProcessMemory hProcess, ByVal ECXI + &H14, GwSL, 4, 0 '读出怪物数量
ReadProcessMemory hProcess, ByVal ECXI + &H24, tmp1, 4, 0 '读出怪物数组的最大值
ReadProcessMemory hProcess, ByVal ECXI + &H18, tmp2, 4, 0 '读出怪物列表的首地址
Do While (i < 768)
ReadProcessMemory hProcess, ByVal tmp2 + 4 * i, eax, 4, 0 '读取怪物偏移
If eax > 0 Then
ReadProcessMemory hProcess, ByVal eax + &H4, eax, 4, 0 '读取怪物信息指针
ReadProcessMemory hProcess, ByVal eax + &H130, GwHp, 4, 0 '怪物当前血值
ReadProcessMemory hProcess, ByVal eax + &H148, GwHPMAX, 4, 0 '怪物血值上限
ReadProcessMemory hProcess, ByVal eax + &H128, GwLv, 2, 0 '怪物等级
ReadProcessMemory hProcess, ByVal eax + &H3C, GwX, 4, 0 '怪物X坐标
ReadProcessMemory hProcess, ByVal eax + &H44, GwY, 4, 0 '怪物Y坐标
ReadProcessMemory hProcess, ByVal eax + &H22C, GwJl, 4, 0 '人与怪物距离
ReadProcessMemory hProcess, ByVal eax + &H120, GwClass, 4, 0 '怪物类别
ReadProcessMemory hProcess, ByVal eax + &HB4, GwZl, 4, 0 '怪物种类 6为怪,7为NPC,9为宠物 A为GM
ReadProcessMemory hProcess, ByVal eax + &H11C, GWID, 4, 0 '怪物ID
'----怪物名称------------------------------
ReadProcessMemory hProcess, ByVal eax + &H208, ECXI, 4, 0 '读取怪物名称首地址
ReadProcessMemory hProcess, ByVal ECXI, GwNameb(0), 64, 0 '怪物名称
GwName = Left$(GwNameb, 64)
GwName = Trim(GwName)
'------------------------------------------
XX = Abs(GwX - Val(Text4.Text))
YY = Abs(GwY - Val(Text7.Text))
If GwZl = 6 And XX < Text8.Text And YY < Text8.Text Then
t = t + 1
JLt(t) = GwJl
IDt(t) = GWID
End If
End If
i = i + 1
If i >= tmp1 Then
Exit Do
End If
Loop
For p = 1 To t
For o = 1 To t
If JLt(p) > JLt(o) Then
t1 = JLt(p): JLt(p) = JLt(o): JLt(o) = t1
t2 = IDt(p): IDt(p) = IDt(o): IDt(o) = t2
End If
Next o
Next p
If t < 1 Then
Exit Sub
End If
ReadProcessMemory hProcess, ByVal ecx2 + &H7C0, gwid1, 4, 0& '获取ID
If gwid1 = 0 Then
Call SelectFunc(hWd, IDt(t - 1))
Call NormalAttackFunc(hWd)
xg = 0
End If
If gwid1 <> 0 Then
xg = xg + 1
If xg >= Val(Text5.Text) Then
xg = 0
Call SelectFunc(hWd, IDt(t - 2))
End If
End If
CloseHandle (hProcess)
End Sub
Private Sub Form_Load()
Dim hWd As Long
hWd = FindWindow("ElementClient Window", "Element Client")
GetWindowThreadProcessId hWd, pid
End Sub
Private Sub Timer3_Timer() '技能
Dim hWd As Long
Dim pid As Long
Dim hProcess As Long
Dim ECXI As Long
Dim gwid1 As Long
Dim ecx2 As Long
hWd = FindWindow("zElementClient Window", "Element Client")
GetWindowThreadProcessId hWd, pid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
ReadProcessMemory hProcess, ByVal &H91A64C, ECXI, 4, 0
ReadProcessMemory hProcess, ByVal ECXI + &H28, ecx2, 4, 0 '获取2级基址
ReadProcessMemory hProcess, ByVal ecx2 + &H7C0, gwid1, 4, 0& '获取ID
If gwid1 <> 0 And dz = 0 And Check7.Value = 1 Then
Call NormalAttackFunc(hWd)
End If
CloseHandle (hProcess)
End Sub
Sub Wait(i As Double)
Dim delaytime As Double
delaytime = GetTickCount
Do
DoEvents
If GetTickCount > delaytime + i Then Exit Sub
Loop
End Sub
Sub Pick()
Dim i As Long
Dim WpNameb(63) As Byte
Dim hWnd As Long
Dim pid As Long
Dim hProcess As Long
Dim ECXI As Long
Dim eax As Long
Dim tmp1 As Long
Dim tmp2 As Long
Dim WpSL As Long
Dim WpX As Single
Dim WpY As Single
Dim WPID1 As Long
Dim WpJl As Single
Dim WPID2 As Long
Dim WpName As String
Dim now As Long
Dim ecx2 As Long
hWnd = FindWindow("zElementClient Window", "Element Client")
GetWindowThreadProcessId hWnd, pid
hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
'----物品信息---------------------------------------------
ReadProcessMemory hProcess, ByVal &H91A64C, ECXI, 4, 0
ReadProcessMemory hProcess, ByVal ECXI + &H28, ecx2, 4, 0 '获取2级基址
ReadProcessMemory hProcess, ByVal ecx2 + &H7C0, now, 4, 0& '获取ID
ReadProcessMemory hProcess, ByVal ECXI + &H8, eax, 4, 0
ReadProcessMemory hProcess, ByVal eax + &H24, ECXI, 4, 0 '物品指针
ReadProcessMemory hProcess, ByVal ECXI + &H14, WpSL, 4, 0 '读出物品数量
ReadProcessMemory hProcess, ByVal ECXI + &H24, tmp1, 4, 0 '读出物品数组的最大值
ReadProcessMemory hProcess, ByVal ECXI + &H18, tmp2, 4, 0 '读出物品列表的首地址
If now <> 0 Then
Exit Sub
End If
Do While (i < 768)
ReadProcessMemory hProcess, ByVal tmp2 + 4 * i, eax, 4, 0 '读取怪物偏移
If eax > 0 Then
ReadProcessMemory hProcess, ByVal eax + &H4, eax, 4, 0 '读取物品信息指针
ReadProcessMemory hProcess, ByVal eax + &H3C, WpX, 4, 0 '物品X坐标
ReadProcessMemory hProcess, ByVal eax + &H44, WpY, 4, 0 '物品Y坐标
ReadProcessMemory hProcess, ByVal eax + &H10C, WPID1, 4, 0 '物品系统ID
ReadProcessMemory hProcess, ByVal eax + &H110, WPID2, 4, 0 '物品ID
ReadProcessMemory hProcess, ByVal eax + &H154, WpJl, 4, 0 '人与物品距离
'----物品名称------------------------------
ReadProcessMemory hProcess, ByVal eax + &H164, ECXI, 4, 0 '读取物品名称首地址
ReadProcessMemory hProcess, ByVal ECXI, WpNameb(0), 64, 0 '物品名称
WpName = Left$(WpNameb, 64)
WpName = Trim(WpName)
'------------------------------------------
If WpJl < 6 Then
Call PickFunc(hWnd, WPID2, WPID1)
End If
End If
i = i + 1
If i >= tmp1 Then Exit Do
Loop
CloseHandle (hProcess)
End Sub
http://yunpan.cn/QXNbb8BzQ4Wpf |
|