⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mf.frm

📁 热血助手VB源码....有需要的自己下....
💻 FRM
📖 第 1 页 / 共 5 页
字号:
On Error Resume Next
If IsNumeric(MPD.Text) = True Then
 If Left(MPD.Text, 1) = "-" Then MPD.Text = Right(MPD.Text, Len(MPD.Text) - 1)
 If Left(MPD.Text, 1) = "+" Then MPD.Text = Right(MPD.Text, Len(MPD.Text) - 1)
 DefaultNL = CInt(MPD.Text)
End If
End Sub

Private Sub MPD_KeyDown(KeyCode As Integer, Shift As Integer)
If IsNumeric(MPD.Text) = True Then
If KeyCode = 13 Then Saveini "setting", "加蓝保护", MPD.Text, IniFile: MiNiLife.SetFocus: MiNiLife.SelStart = 0: MiNiLife.SelLength = Len(MiNiLife.Text)
If KeyCode = 109 Then MPD.Text = MPD.Text - 100: Saveini "setting", "加蓝保护", MPD.Text, IniFile
If KeyCode = 107 Then MPD.Text = MPD.Text + 100: Saveini "setting", "加蓝保护", MPD.Text, IniFile
End If
End Sub

Sub Form_Load()
On Error Resume Next
If App.PrevInstance Then
   HasRun = True
   Unload Me
Else
   HasRun = False
End If

If Dir(GetApp & "myjh.ini") = "" Then CreateIni
If Dir(GetApp & "ncjz.ini") = "" Then CreateMemoryIni
   IniFile = GetApp & "myjh.ini"
   MemoryIniFile = GetApp & "ncjz.ini"

Me.Width = 5115: Me.Height = 3810
Me.Top = Screen.Height - Me.Height - 900
Me.Left = Screen.Width - Me.Width - 900
SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, 3

LoadINI

StartFt = False
FangX = 0

SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, 3
'**********************************DLL
    SetKeyboardHook Me.hWnd, WM_USER
    If Err.Number <> 0 Then
       DownloadFile "http://www.szdnwx.com/soft/dll.rar", GetApp & "rxzs.dll"
       MsgBox "rxzs.dll下载成功,请重新运行助手。", , "提示:"
       End
    End If
    prevWndProc = GetWindowLong(Me.hWnd, GWL_WNDPROC)
    SetWindowLong Me.hWnd, GWL_WNDPROC, AddressOf WndProc
'**********************************DLL
If MA(1).Text = "" Then CmdNet_Click
End Sub
Private Sub AllOver()  '结束程序
          Timer1.Enabled = False: TF1.Enabled = False
          TAD.Enabled = False
'**********************************DLL
If HasRun = False Then
    ReleaseKeyboardHook
    SetWindowLong Me.hWnd, GWL_WNDPROC, prevWndProc
End If
'**********************************DLL
          End
End Sub
Private Sub LoadINI()
Dim tmp As String
   tmp = GetINI("setting", "加红保护", IniFile): HPD.Text = tmp: tmp = ""
   tmp = GetINI("setting", "加蓝保护", IniFile): MPD.Text = tmp: tmp = ""
   tmp = GetINI("setting", "少血回城", IniFile): MiNiLife.Text = tmp: tmp = ""
   tmp = GetINI("setting", "KeyPressF0", IniFile): CBF(0).Text = tmp: tmp = ""
   tmp = GetINI("setting", "KeyPressF1", IniFile): CBF(1).Text = tmp: tmp = ""
   tmp = GetINI("setting", "KeyPressF2", IniFile): CBF(2).Text = tmp: tmp = ""
   tmp = GetINI("setting", "KeyPressF3", IniFile): CBF(3).Text = tmp: tmp = ""
   tmp = GetINI("setting", "KeyPressF4", IniFile): CBF(4).Text = tmp: tmp = ""  '读取自动技能设置
   tmp = GetINI("setting", "KeyPressF5", IniFile): CBT.Text = tmp: tmp = ""  '读取自动技能设置
   tmp = GetINI("setting", "ShoutT", IniFile): ShoutT.Text = tmp: tmp = ""   '喊话的时间间隔
   Dim i As Integer
   For i = 1 To 11
       tmp = GetINI("setting", "Memory" & i, MemoryIniFile): MA(i).Text = tmp: tmp = "" '读取内存基址
   Next i
   ReadLstInI
   
DefaultLife = CInt(HPD.Text)
DefaultNL = CInt(MPD.Text)
DefaultMiniLife = CInt(MiNiLife.Text)
End Sub

Private Sub MTT_Click()
MTT.Locked = True
PS(0).SetFocus
End Sub

Private Sub MTT_DropDown()
MTT.Locked = False
Dim tmpMTT As String
tmpMTT = MTT.Text
MTT.Clear
MTT.AddItem "100"
MTT.AddItem "200"
MTT.AddItem "300"
MTT.AddItem "400"
MTT.AddItem "500"
MTT.AddItem "600"
MTT.AddItem "700"
MTT.AddItem "800"
MTT.AddItem "900"
MTT.AddItem "1000"
MTT.AddItem "1500"
MTT.AddItem "2000"
MTT.AddItem "2500"

If MTT.Text = "" Then MTT.Text = tmpMTT
End Sub

Private Sub MTT_KeyDown(KeyCode As Integer, Shift As Integer)
MTT.Locked = True
End Sub


Private Sub OffLineC_Click()
If OffLineC.Value = 1 Then OFFLINECI = 1
End Sub

Private Sub QE_Click()

End Sub

Private Sub ShoutT_Click()
On Error Resume Next
ShoutT.Locked = True
If IsNumeric(ShoutT.Text) = True Then
     Saveini "setting", "ShoutT", ShoutT.Text, IniFile
End If
End Sub

Private Sub ShoutT_DropDown()
ShoutT.Locked = False
Dim tmp
If ShoutT.Text <> "" Then tmp = ShoutT.Text
ShoutT.Clear
Dim i As Integer
For i = 1 To 60
  ShoutT.AddItem i
Next i
ShoutT.AddItem "120"
ShoutT.AddItem "180"
ShoutT.AddItem "240"
If ShoutT.Text = "" Then ShoutT.Text = tmp
End Sub

Private Sub ShoutT_KeyDown(KeyCode As Integer, Shift As Integer)
ShoutT.Locked = True
End Sub

Private Sub SW_KeyDown(KeyCode As Integer, Shift As Integer)  '更新喊话内容时按回车的处理代码
   If KeyCode = 13 And SW.Text <> "" Then CmdUpdate.SetFocus
End Sub

Private Sub t36_Change()
My36
End Sub


Private Sub My36()
       If MF.txtGJ.Text = "F12开助手" Then Exit Sub
       StartFt = Not StartFt
       MF.TAD.Enabled = StartFt
       If StartFt = True Then
          LX = CInt(NcnrX(Val(MA(4).Text)))
          LY = CInt(NcnrX(Val(MA(5).Text)))
          MF.txtGJ.Text = "Home关挂机"
          SendKeys "/锁定:[" & LX & " " & LY & "]"
          SendKeys "{enter}"
          MousePointN = Getmousehandle
          KKK = 0
       Else
          LX = "0": LY = "0"
          If CBMode.Text = "1024*768" Then
          SetCursorPos 512, 500
          Else
          SetCursorPos 400, 385
          End If
          ReadPos
          MF.txtGJ.Text = "Home开挂机"
       End If
End Sub

Private Sub TCV_Timer()
If CKF(5).Value = 1 Then
    JJJ = JJJ + 1
    Dim tmp As Integer
    tmp = CInt(Left(CBDS.Text, Len(CBDS.Text) - 1))
    If JJJ >= tmp Then KeyPressFJ (CBT.Text)  '如果到了时间 就按下了
    If JJJ = tmp Then JJJ = 0
End If
End Sub


Private Sub TLL_Timer()
LLI = LLI + 1
If LLI = 600 And CKLLShutDown.Value = 1 Then
      If CBCL.Text = "直接关机" Then
          Call VBShutdown    '检测不到江湖窗口 执行关机
      Else
          SendMessage Me.hWnd, WM_APPCOMMAND, &H200EB0, APPCOMMAND_VOLUME_MUTE * &H10000 '开启声音
          CKLLShutDown.Value = 0
      End If
End If
End Sub

Private Sub TS_Timer() '自动喊话时钟
On Error Resume Next
II = II + 1
ShoutDS.Caption = CInt(ShoutT.Text) - II + 1 & "秒"
If IsNumeric(ShoutT.Text) = True And II = CInt(ShoutT.Text) Then
  II = 0
  Dim i As Integer
  i = Len(TXTShoutS.Text)
  If ShoutCount = i + 1 Then ShoutCount = 1
  LstWD.ListIndex = Mid(TXTShoutS.Text, ShoutCount, 1)
         If LstWD.ListIndex >= 0 Then
            TmpTxt.Text = Right(LstWD.Text, Len(LstWD.Text) - 2)
         Else
            TmpTxt.Text = ""
         End If
         TmpTxt.Text = Replace(TmpTxt.Text, "+", "{+}")
         TmpTxt.Text = Replace(TmpTxt.Text, "^", "{^}")
         TmpTxt.Text = Replace(TmpTxt.Text, "%", "{%}")
         TmpTxt.Text = Replace(TmpTxt.Text, "~", "{~}")
         TmpTxt.Text = Replace(TmpTxt.Text, "(", "{(}")
         TmpTxt.Text = Replace(TmpTxt.Text, ")", "{)}")
         If ShoutSpace.Value = 1 Then
             SendKeys TmpTxt.Text
         Else
             SendKeys TmpTxt.Text & Space(CInt(Rnd * 8))
         End If
         SendKeys "{enter}"
  ShoutCount = ShoutCount + 1
End If

End Sub
Private Sub TF1_Timer()  '自动技能时钟
If CKF(4).Value = 1 Then
 
 KeyPressFJ (CBF(4).Text)

End If
End Sub


Private Sub TTime_Timer()
'Dim PI As POINTAPI
'GetCursorPos PI
'Me.Caption = PI.X & "  " & PI.Y

On Error Resume Next
'20秒按一次ESC 如果断线 按ESC会跳出江湖的窗口  检测不到江湖的窗口 执行关机命令
'这一部分适用于开店用 因为每20秒按一次ESC 那么聊天窗口的内容会消失,这样会影响聊天的内容
If OffLineC.Value = 1 Then
   OFFLINECI = OFFLINECI + 1      '时间秒数的变量  这个变量事先定义
   Dim tmpzero As Long
   tmpzero = FindWindow(vbNullString, "YB_OnLineClient")    '关断江湖窗口
   If OFFLINECI = 20 Then
      SendKeys "{ESC}"
      OFFLINECI = 0    '按下ESC后重新开始计秒数
      If tmpzero = 0 Then
        If CBCL.Text = "直接关机" Then
          Call VBShutdown    '检测不到江湖窗口 执行关机
        Else
          SendMessage Me.hWnd, WM_APPCOMMAND, &H200EB0, APPCOMMAND_VOLUME_MUTE * &H10000 '开启声音
          OffLineC.Value = 0
        End If
      End If
   End If
End If


'下面的这段内容是无历炼增加自动关机的代码
If CKLLShutDown.Value = 1 Then
  Dim Tmpll As Integer
  Tmpll = CInt(Ncnr(Val(MA(3).Text)))  '游戏中历炼的基址
  If Tmpll <> CInt(LBLL.Caption) Then LLI = 1
  LBLL.Caption = Tmpll: LBLL.Refresh
  LBLLTIME.Caption = LLI & "秒": LBLLTIME.Refresh
  Else
  LBLL.Caption = ""
  LBLLTIME.Caption = "0秒"
  LBLLTIME.Refresh
End If

'下面的这段内容是 QE 200秒不群 自动移动位置的代码
'原理是200秒内,如果不使用一个兰,那么判断为卡住 则移动
'If YNCKFK = True Then
'  YNCKFKI = YNCKFKI + 1
'  LBYNCKFKI.Caption = YNCKFKI & "秒"
'  LBYNCKFKI.Refresh
'  If YNCKFKI > 118 Then  '118
'  Dim i, r As Integer
'  i = Int(360 * Rnd): r = Int(16 * Rnd) + 30
'  If CBMode.Text = "1024*768" Then
'     SetCursorPos Int(r * Cos(i)) + 512, Int(r * Sin(i)) + 488
'  Else
'     SetCursorPos Int(r * Cos(i)) + 400, Int(r * Sin(i)) + 388
'  End If
'     mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
'     mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
'     Sleep 300
'        If YNCKFKI = 120 Then  '120
'        YNCKFKI = 0
 '
 '       If CBMode.Text = "1024*768" Then
 '           SetCursorPos 80, 10
 '       Else
 '           SetCursorPos 100, 50
 '       End If
 '       Sleep 200
  '      mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
 '       mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
 '    End If
 ' End If
'End If

LBTM.Text = Time
LBTM.Refresh
End Sub

Private Sub txtGJ_Change() '改成绿色背景
If txtGJ.Text = "Home开挂机" Then
   txtGJ.ForeColor = &H80000008
Else
   txtGJ.ForeColor = &HC0&
End If
End Sub

Private Sub useshout_Click() '喊话设成开启
If LstWD.ListIndex < 0 Then Exit Sub
On Error Resume Next
If Left(LstWD.Text, 2) <> "√:" Then
   Saveini "setting", "LST" & LstWD.ListIndex + 1, "√:" & Right(LstWD.Text, Len(LstWD.Text) - 2), IniFile
End If
ReadLstInI
End Sub
Private Sub notuseshout_Click() '喊话设成禁用
If LstWD.ListIndex < 0 Then Exit Sub
On Error Resume Next
If Left(LstWD.Text, 2) = "√:" Then
   Saveini "setting", "LST" & LstWD.ListIndex + 1, "X:" & Right(LstWD.Text, Len(LstWD.Text) - 2), IniFile
End If
ReadLstInI
End Sub
Private Sub editshout_Click() '更改喊话的内容
If LstWD.ListIndex < 0 Then Exit Sub
   SW.Text = Right(LstWD.Text, Len(LstWD.Text) - 2)
   CmdUpdate.Enabled = True
   SW.SetFocus: SW.SelStart = 0: SW.SelLength = Len(SW.Text)
End Sub
Private Function Ncnr(lpAddress As Long) As Integer '读内存代码1 红和蓝 数字型
 GameHwnd = FindWindow(vbNullString, "YB_OnLineClient")
 GetWindowThreadProcessId GameHwnd, GamePid
 GPPid = OpenProcess(&H1F0FFF, 0, GamePid)
 ReadProcessMemory GPPid, lpAddress, ByVal VarPtr(Ncnr), 4, 0&
 CloseHandle GPPid
End Function
Private Function NcnrX(lpAddress As Long) As Single '读内存代码2 人物的坐标,而不是地图的坐标 浮点数
 GameHwnd = FindWindow(vbNullString, "YB_OnLineClient")
 GetWindowThreadProcessId GameHwnd, GamePid
 GPPid = OpenProcess(&H1F0FFF, 0, GamePid)
 ReadProcessMemory GPPid, lpAddress, ByVal VarPtr(NcnrX), 8, 0&
 CloseHandle GPPid
End Function
Private Function NcnrY(lpAddress As Long) As Long '读内存代码3 F1-F10使用 读内存的偏移
 GameHwnd = FindWindow(vbNullString, "YB_OnLineClient")
 GetWindowThreadProcessId GameHwnd, GamePid
 GPPid = OpenProcess(&H1F0FFF, 0, GamePid)
 ReadProcessMemory GPPid, lpAddress, ByVal VarPtr(NcnrY), 4, 0&
 CloseHandle GPPid
End Function

Private Sub Timer1_Timer() '这里是以后游戏升级后要改的基址,一般网上都能找到。
On Error Resume Next
Dim tmpl, tmph As Integer
tmph = CInt(Ncnr(Val(MA(1).Text)))   '游戏中当前生命的基址
tmpl = CInt(Ncnr(Val(MA(2).Text)))  '游戏中当前内力的基址
If IsNumeric(tmph) = True And CKF(0).Value = 1 And tmph < DefaultLife Then KeyPressFJ (CBF(0).Text)
If IsNumeric(tmpl) = True And CKF(1).Value = 1 And tmpl < DefaultNL Then KeyPressFJ (CBF(1).Text): YNCKFKI = 0
If IsNumeric(tmph) = True And CKF(2).Value = 1 And tmph < DefaultMiniLife Then THC.Enabled = True

'下面是F1-F10的基址。判断红蓝的个数,当=1个时回城
'======================================================3333333333333333333333=====================================
TmpSL1 = Ncnr(NcnrY(NcnrY(Val(MA(6).Text)) + Val("&H" & Hex(Tmpj)) + Val(MA(8).Text)) + Val(MA(9).Text))
TmpSL2 = Ncnr(NcnrY(NcnrY(Val(MA(6).Text)) + Val("&H" & Hex(Tmpi)) + Val(MA(8).Text)) + Val(MA(9).Text))
TmpSL3 = Ncnr(NcnrY(NcnrY(Val(MA(6).Text)) + Val("&H" & Hex(Tmpk)) + Val(MA(8).Text)) + Val(MA(9).Text))
'======================================================44444444444444444444444444444=====================================
If TmpSL1 = 2 Or TmpSL2 = 2 Then THC.Enabled = True
End Sub



Private Sub THC_Timer()
      
      Dim tmp, Tk, Th As Integer
      Tk = Right(CBF(2).Text, Len(CBF(2).Text) - 1)
      Tk = (Tk - 1) * CInt(MF.MA(7).Text)
      tmp = Ncnr(NcnrY(NcnrY(Val(MA(6).Text)) + Val("&H" & Hex(Tk)) + Val(MA(8).Text)) + Val(MA(9).Text))
      
      Th = CInt(Ncnr(Val(MA(1).Text)))
      If Th = 0 Then
          StartFt = False
          TF1.Enabled = False
          TAD.Enabled = False
          MF.THC.Enabled = False: MF.txtGJ.Text = "Home开挂机"
          Dim i As Integer
          For i = 0 To 4
              MF.CKF(i).Enabled = T

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -