植物大战僵尸中文版 作弊器VB源码 可自动加阳光加金币,无冷却,怪秒死等

sharembweb 14次浏览
源码下载:https://pan.baidu.com/s/1jIoZAYy (百度云盘)
代码部分:





Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) 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 ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Const PROCESS_ALL_ACCESS = &H1F0FFF
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
Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long

Private Sub Command1_Click()
    Dim hwd As Long
    Dim phandle As Long
    Dim address As Long
    Dim x As Long
    Dim a As Long
    Dim s, c, isOK
    Dim nKaCaoGe, nZhiWeuShu, nThisGuai, nCountGuai, nThisGuanKa, nHP
    
    
    
    hwd = FindWindow(vbNullString, "植物大战僵尸中文版")
    GetWindowThreadProcessId hwd, Pid
    phandle = OpenProcess(PROCESS_ALL_ACCESS, False, Pid)
    If phandle Then
    
        '当前管卡
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H24, ByVal VarPtr(address), 4, 0&
        nThisGuanKa = address
        c = c & "当前管卡=" & nThisGuanKa & vbCrLf
        
        '休闲花园花盆总数:
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H350, ByVal VarPtr(address), 4, 0&
        c = c & "花园花盆总数=" & address & vbCrLf
     
        '卡槽格数
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H144, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H24, ByVal VarPtr(address), 4, 0&
        nKaCaoGe = address
        c = c & "卡槽格数=" & nKaCaoGe & vbCrLf
    
        '植物数量
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &HBC, ByVal VarPtr(address), 4, 0&
        nZhiWeuShu = address
        c = c & "植物数量=" & nZhiWeuShu & vbCrLf
    
        '当前怪物数
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &HA0, ByVal VarPtr(address), 4, 0&
        nThisGuai = address
        c = c & "当前怪物数=" & nThisGuai & vbCrLf
    
        '怪物数上限
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H94, ByVal VarPtr(address), 4, 0&
        nCountGuai = address
        c = c & "怪物数上限=" & nCountGuai & vbCrLf
    
        '地上物品数量
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &HF4, ByVal VarPtr(address), 4, 0&
        c = c & "地上物品数量=" & address & vbCrLf
    
        '智慧树等级
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &HF4, ByVal VarPtr(address), 4, 0&
        c = c & "智慧树等级=" & address & vbCrLf
        
        '阳光
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H5560, ByVal VarPtr(address), 4, 0&
        c = c & "阳光=" & address & vbCrLf
        
        '金币
        a = "&H" & Hex(txtJingBi.Text)
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H28, ByVal VarPtr(address), 4, 0&
        c = c & "金币=" & address & vbCrLf
        
        '化肥
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H1F8, ByVal VarPtr(address), 4, 0&
        c = c & "化肥=" & address & vbCrLf
        
        '巧克力
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H228, ByVal VarPtr(address), 4, 0&
        c = c & "巧克力=" & address & vbCrLf
        
        '杀虫剂
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H1FC, ByVal VarPtr(address), 4, 0&
        c = c & "杀虫剂=" & address & vbCrLf
        
        '树施肥
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H230, ByVal VarPtr(address), 4, 0&
        c = c & "树施肥=" & address & vbCrLf
        
        '智慧树等级
        ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
        ReadProcessMemory ByVal phandle, ByVal address + &HF4, ByVal VarPtr(address), 4, 0&
        c = c & "智慧树等级=" & address & vbCrLf
        

         
        '循环植物
        c1 = ""
        For i = 0 To 88
            x = Val("&H" & Hex(&H40 + (&H14C * i)))
            x = "&H" & Hex(x)
            ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &HAC, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(address), 4, 0&
            '大于0则植物在
            If address > 0 Then
                c1 = c1 & "第 " & (i + 1) & " 植物HP=" & address & vbCrLf
            End If
        Next

        
        
        
        Text1.Text = c1 & vbCrLf & c



        '判断修改阳光
        If isYangGuang.Value = 1 Then
            a = "&H" & Hex(txtYangGuang.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &H5560, ByVal VarPtr(a), 4, ByVal 0&  '阳光
        End If
        '判断修改金币
        If isJingBi.Value = 1 Then
            a = "&H" & Hex(txtJingBi.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &H28, ByVal VarPtr(a), 4, ByVal 0&  '金币
        End If
        '判断修改化肥
        If isHuaFei.Value = 1 Then
            a = "&H" & Hex(txtHuaFei.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &H1F8, ByVal VarPtr(a), 4, ByVal 0&  '化肥
        End If
        '判断修改巧克力
        If isQiaoKeLi.Value = 1 Then
            a = "&H" & Hex(txtQiaoKeLi.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &H228, ByVal VarPtr(a), 4, ByVal 0& '巧克力
        End If
        '判断修改杀虫剂
        If isShaChunJi.Value = 1 Then
            a = "&H" & Hex(txtShaChunJi.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &H1FC, ByVal VarPtr(a), 4, ByVal 0&  '杀虫剂
        End If
        '判断修改树施肥
        If isShuShiFei.Value = 1 Then
            a = "&H" & Hex(txtShuHuaFei.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &H230, ByVal VarPtr(a), 4, ByVal 0&  '树施肥
        End If
        '判断修改智慧树等级
        If isShuDeJi.Value = 1 Then
            a = "&H" & Hex(txtZhiHuiShuLV.Text)
            ReadProcessMemory ByVal phandle, ByVal &H6A9EC0, ByVal VarPtr(address), 4, 0&
            ReadProcessMemory ByVal phandle, ByVal address + &H82C, ByVal VarPtr(address), 4, 0&
            WriteProcessMemory ByVal phandle, ByVal address + &HF4, ByVal VarPtr(a), 4, ByVal 0&  '智慧树等级
        End If
        '判断修改植物血HP
        If isZhiWuHP.Value = 1 Or isZhiWuZeiYiHang.Value = 1 Then
            a = "&H" & Hex(txtDiYiZhiWuFang.Text)
            For i = 0 To 88
                x = Val("&H" & Hex(&H40 + (&H14C * i)))
                x = "&H" & Hex(x)
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &HAC, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(address), 4, 0&
                '大于0则植物在
                If address > 0 Then
                    
                    If isZhiWuHP.Value = 1 Then
                        ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &HAC, ByVal VarPtr(address), 4, 0&
                        WriteProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(a), 4, ByVal 0&
                    End If
                    
                    If isZhiWuZeiYiHang.Value = 1 Then
                        '所有植物在一起
                        x = Val("&H" & Hex(&H8 + (&H14C * i)))
                        x = "&H" & Hex(x)
                        ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &HAC, ByVal VarPtr(address), 4, 0&
                        WriteProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(&H10), 4, ByVal 0&
                    End If
                    
                End If
            Next
        End If
        c1 = ""
        Dim ad As Single
        
        '判断怪
        If isGuanYangLiShuiJing.Value = 1 Or isMiaoShaGuai.Value = 1 Then
            isOK = False
            For i = 0 To 88
                x = Val("&H" & Hex(&HC8 + (&H15C * i)))
                x = "&H" & Hex(x)
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H90, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(address), 4, 0&
                nHP = address
                If address > 0 Then
                    c1 = c1 & "第 " & (i + 1) & " 怪HP=" & address
                    
                    x = Val("&H" & Hex(&H2C + (&H15C * i)))
                    x = "&H" & Hex(x)
                    ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + &H90, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(ad), 4, 0&
                    c1 = c1 & "   怪X=" & ad
                    
                    
                    
                    x = Val("&H" & Hex(&H2C + (&H15C * i)))
                    x = "&H" & Hex(x)
                    ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + &H90, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(address), 4, 0&
                    c1 = c1 & "   类型=" & address
                    
                    
                    '判断怪x位置
                    If ad <= 100 And isGuanYangLiShuiJing.Value = 1 Then
                        x = Val("&H" & Hex(&H2C + (&H15C * i)))
                        x = "&H" & Hex(x)
                        a = "&H" & Hex("1143722032")
                        ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &H90, ByVal VarPtr(address), 4, 0&
                        WriteProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(a), 4, ByVal 0&
                        c1 = c1 & "(怪X处理了)"
                    End If
                    
                    '秒杀怪
                    If isMiaoShaGuai.Value = 1 And ad <= 640 Then
                        x = Val("&H" & Hex(&H28 + (&H15C * i)))
                        x = "&H" & Hex(x)
                        ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                        ReadProcessMemory ByVal phandle, ByVal address + &H90, ByVal VarPtr(address), 4, 0&
                        WriteProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(&H3), 4, ByVal 0&
                    End If
                    c1 = c1 & vbCrLf
                End If
            Next
        
        End If
        Text1.Text = c1
        
        '判断修改植物 大嘴花消化时间
        If isDaZuiHuaXiaoHua.Value = 1 Then
            For i = 0 To 88
                x = Val("&H" & Hex(&H54 + (&H14C * i)))
                x = "&H" & Hex(x)
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &HAC, ByVal VarPtr(address), 4, 0&
                WriteProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(&H0), 4, ByVal 0&
            Next
        End If
        '判断修改植物 向日葵冷却时间
        If isXiangRiKuiLeQueTime.Value = 1 Then
            For i = 0 To 88
                x = Val("&H" & Hex(&H58 + (&H14C * i)))
                x = "&H" & Hex(x)
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &HAC, ByVal VarPtr(address), 4, 0&
                WriteProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(&H0), 4, ByVal 0&
            Next
        End If
        '判断 卡槽冷却
        If isKaCaoLenQue.Value = 1 Then
            For i = 0 To nKaCaoGe - 1
                '判断
                x = Val("&H" & Hex(&H70 + (&H50 * i)))
                x = "&H" & Hex(x)
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H144, ByVal VarPtr(address), 4, 0&
                WriteProcessMemory ByVal phandle, ByVal (address + x), ByVal VarPtr(&H1), 4, ByVal 0&  '修改槽冷却
                
                '等待时间
                x = Val("&H" & Hex(&H4C + (&H50 * i)))
                x = "&H" & Hex(x)
                a = "&H" & Hex("99999")
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H144, ByVal VarPtr(address), 4, 0&
                WriteProcessMemory ByVal phandle, ByVal (address + x), ByVal VarPtr(a), 4, ByVal 0&  '修改槽冷却
            Next
        End If
                
        '循环植物 自动收集地上金币和阳光
        If isAutoShouJiYangGuangJB.Value = 1 Then
            For i = 0 To 88
                x = Val("&H" & Hex(&H10 + (&HD8 * i)))
                x = "&H" & Hex(x)
                ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + &HE4, ByVal VarPtr(address), 4, 0&
                ReadProcessMemory ByVal phandle, ByVal address + x, ByVal VarPtr(address), 4, 0&
                If address = 60 Then
                    x = Val("&H" & Hex(&H50 + (&HD8 * i)))
                    x = "&H" & Hex(x)
                    ReadProcessMemory ByVal phandle, ByVal &H18FA64, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + &H768, ByVal VarPtr(address), 4, 0&
                    ReadProcessMemory ByVal phandle, ByVal address + &HE4, ByVal VarPtr(address), 4, 0&
                    WriteProcessMemory ByVal phandle, ByVal (address + x), ByVal VarPtr(&H1), 4, ByVal 0&
                End If
            Next
        End If
        
        
         
    End If
    CloseHandle phandle
End Sub
 
 
'加载
Private Sub Form_Load()
    Me.Caption = "植物大战僵尸中文版 作弊器 来自 xiyueta.com"
    Me.Top = 0
    Me.Left = 0
End Sub

Private Sub Timer1_Timer()
    Command1_Click
End Sub
'开闭自动作弊器
Private Sub cmdAutoGame_Click()
    If cmdAutoGame.Caption = "自动" Then
        cmdAutoGame.Caption = "关闭"
        Command1_Click
        Timer1.Enabled = True
    Else
        cmdAutoGame.Caption = "自动"
        Timer1.Enabled = False
    End If
End Sub

'测试
Private Sub cmdTEST_Click()
    For i = 0 To 10
            x = Val("&H" & Hex(&H40 + (&H14C * i)))
            x = "&H" & Hex(x)
            MsgBox (x)
    Next
     
    
End Sub



随机内容

表情

共2条评论
  • 网友评论:

    赞一个

    2020-07-24 16:26:24 回复

  • 网友评论:

    学习了

    2020-07-24 16:26:24 回复

友情链接