####本例只是用来简单演示一些功能,并未用到读取指针得到存放人物动态数据指针的地址,继而实现连射
等一些功能,因为考虑到游戏的公平性
为了使大家能够尽可能多的享受龙族,所以这个例子仅限于加速,照明,无限捐款和远处呼叫NPC
编写中一个要注意的问题就是只有在照明开启成功的情况下呼叫NPC和无限捐款才能启动
- Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As
- String, ByVal lpWindowName As String) As Long
- Private Declare Function GetWindowThreadProcessId Lib "USER32" (ByVal hwnd As Long,
- lpdwProcessId As Long) As Long
- Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long,
- ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
- Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long,
- ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten
- As Long) As Long
- Dim DRHwnd As Long
- Dim DRPid As Long
- Dim DRProcessHandle As Long
- Private Const PROCESS_ALL_ACCESS = &H1F0FFF
- Private Sub Command1_Click()
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label1.Caption = "外挂启动失败"
- Else
- Label1.Caption = "外挂启动成功"
- Timer1.Enabled = True
- End If
- End Sub
- Private Sub Command10_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5F1CE2C, &H1, 1, 0&
- End Sub
- Private Sub Command11_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60D0964, &H1, 1, 0&
- End Sub
- Private Sub Command12_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60A4474, &H1, 1, 0&
- End Sub
- Private Sub Command13_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60E6BDC, &H1, 1, 0&
- End Sub
- Private Sub Command2_Click()
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label2.Caption = "加速启动失败"
- Else
- Label2.Caption = "加速启动成功"
- WriteProcessMemory DRProcessHandle, &H474CE6, &HEB, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D61, &HD2, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D62, &H90, 1, 0&
- End If
- End Sub
- Private Sub Command3_Click()
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label3.Caption = "捐款失败"
- Else
- Label3.Caption = "可以捐款"
- Timer3.Enabled = True
- End If
- End Sub
- Private Sub Command4_Click()
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label2.Caption = "加速关闭失败"
- Else
- Label2.Caption = "加速关闭成功"
- WriteProcessMemory DRProcessHandle, &H474CE6, &H76, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D61, &H55, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D62, &HF4, 1, 0&
- End If
- End Sub
- Private Sub Command5_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60D7F8C, &H1, 1, 0&
- End Sub
- Private Sub Command6_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5EE1CEC, &H1, 1, 0&
- End Sub
- Private Sub Command7_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5F50944, &H1, 1, 0&
- End Sub
- Private Sub Command8_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60B30C4, &H1, 1, 0&
- End Sub
- Private Sub Command9_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60DF5B4, &H1, 1, 0&
- End Sub
- Private Sub Form_Load()
- End Sub
- Private Sub OLE1_Updated(Code As Integer)
- OLE1.Visible = True
- End Sub
- Private Sub Timer1_Timer()
- WriteProcessMemory DRProcessHandle, &H5DB144, &H1F, 1, 0&
- End Sub
- Private Sub Timer3_Timer()
- WriteProcessMemory DRProcessHandle, &H5D98F8C, &H1, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5EF7F78, &H1, 1, 0&
- End Sub
- Private Sub 帮助_Click()
- OLE1.Visible = True
- End Sub
- Private Sub 传送_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5EE1CEC, &H1, 1, 0&
- End Sub
- Private Sub 服饰_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60D0964, &H1, 1, 0&
- End Sub
- Private Sub 公告_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5F1CE2C, &H1, 1, 0&
- End Sub
- Private Sub 关闭加速_Click()
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label2.Caption = "加速关闭失败"
- Else
- Label2.Caption = "加速关闭成功"
- WriteProcessMemory DRProcessHandle, &H474CE6, &H76, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D61, &H55, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D62, &HF4, 1, 0&
- End If
- End Sub
- Private Sub 开启加速_Click(Index As Integer)
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label2.Caption = "加速启动失败"
- Else
- Label2.Caption = "加速启动成功"
- WriteProcessMemory DRProcessHandle, &H474CE6, &HEB, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D61, &HD2, 1, 0&
- WriteProcessMemory DRProcessHandle, &H474D62, &H90, 1, 0&
- End If
- End Sub
- Private Sub 开启捐款_Click()
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label3.Caption = "捐款失败"
- Else
- Label3.Caption = "可以捐款"
- Timer3.Enabled = True
- End If
- End Sub
- Private Sub 开启照明_Click(Index As Integer)
- OLE1.Visible = False
- DRHwnd = FindWindow("DRAGONRAJA_CLASS", "")
- GetWindowThreadProcessId DRHwnd, DRPid
- DRProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, DRPid)
- If DRProcessHandle = 0 Then
- Label1.Caption = "外挂启动失败"
- Else
- Label1.Caption = "外挂启动成功"
- Timer1.Enabled = True
- End If
- End Sub
- Private Sub 面包_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60B30C4, &H1, 1, 0&
- End Sub
- Private Sub 木材_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60DF5B4, &H1, 1, 0&
- End Sub
- Private Sub 铁匠_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60A4474, &H1, 1, 0&
- End Sub
- Private Sub 药水店_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60D7F8C, &H1, 1, 0&
- End Sub
- Private Sub 银行_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H5F50944, &H1, 1, 0&
- End Sub
- Private Sub 制弓_Click(Index As Integer)
- WriteProcessMemory DRProcessHandle, &H5E23E8, &H0, 1, 0&
- WriteProcessMemory DRProcessHandle, &H60E6BDC, &H1, 1, 0&
- End Sub