有一个朋友玩诛仙的,老问我要外挂
可问题是我学C/C++的,不太会外挂
就去网上搜了,只有部分源码
求VB帮忙完成下
源码如下
引入两个文件,memory和sting;
定义了两个全局 其实不必要 主要是我集成到了挂机里面
Global $teshu
Global $teshu2
定义热键 
HotKeySet("{F10}", "chuan") ;
定义内存基址
        $Address = 0x008F58D4
        $Address2 = 0x0012F824
        $Back = 0x008D68B4
        $ofset = 0x24
$fei = 0x0045ae59
        $chuan = 0x004063b4
        $playerbase=0x0012F824;
获取游戏窗口句柄
        $WinHandle = WinGetHandle("Element Client");
获取游戏进程PID
        $CurProcID=WinGetProcess("Element Client");
获取内存读写句柄
        $Handle = _MemoryOpen($CurProcID)
        $Address = _MemoryRead("0x" & Hex($Address ), $Handle)
        $Base = _MemoryRead("0x" & Hex($Address+$ofset ), $Handle);
下面是检测人物名称的过程
Local $Player_Name_Ptr = _MemoryRead("0x" & Hex($base+0x398), $Handle)
$Player_Name = ""
For $NameCount = 0 To 32
    $tmpName = _MemoryRead("0x" & Hex($Player_Name_Ptr + $NameCount * 2), $Handle, "ushort")
    $Player_Name &= Unicode2Asc(Binary($tmpName))
    if $tmpName = 0 Then
        ExitLoop
    EndIf
NextFunc Unicode2Asc($UniString)
    If Not IsBinary($UniString) Then
        SetError(1)
        Return $UniString
    EndIf
    Local $BufferLen = StringLen($UniString)
    Local $Input = DllStructCreate("byte[" & $BufferLen & "]")
    Local $Output = DllStructCreate("char[" & $BufferLen & "]")
    DllStructSetData($Input, 1, $UniString)
    Local $Return = DllCall("kernel32.dll", "int", "WideCharToMultiByte", _
        "int", 0, _
        "int", 0, _
        "ptr", DllStructGetPtr($Input), _
        "int", $BufferLen / 2, _
        "ptr", DllStructGetPtr($Output), _
        "int", $BufferLen, _
        "int", 0, _
        "int", 0)
    Local $AscString = DllStructGetData($Output, 1)
    $Output = 0
    $Input = 0
    Return $AscString
EndFunc;
没开游戏的话......
        If $Handle=0 then
                MsgBox(4096,"错误提示","打开游戏错误,可能没有运行游戏!")
                Exit
        EndIf;
提示当前人物是谁
TrayTip('飞翔版','当前人物:' & $Player_Name & ' ',10,1)
Sleep(2000);
建一个循环 不断的写入飞天的值 3448439146是4字节值,相当于汇编的push 0a 这个是一开程序就可以飞天的
While 1      
_MemoryWrite("0x" & Hex($fei), $Handle, 3448439146 )
ToolTip("飞翔模式开启中...", 0, 0)
Sleep(500)
WEnd;
如果想用热键控制飞天 就用下面的子程序
Func fei()
    $teshu = NOT $teshu
    While $teshu
                sleep(100)
        _MemoryWrite("0x" & Hex($fei), $Handle, 3448439146 )
     
ToolTip("飞翔模式开启中...", 0, 0)    WEnd
    ToolTip("飞翔模式已关闭...", 0, 0)
        _MemoryWrite("0x" & Hex($fei), $Handle, 3448441450 )
        sleep(2000)
         ToolTip("", 0, 0)
EndFunc;
穿墙的子程序 由F10控制
Func chuan()
    $teshu2 = NOT $teshu2
    While $teshu2
                sleep(500);
写入穿墙的时候同时写入飞天值  因为中断了循环 飞天不再进行
                _MemoryWrite("0x" & Hex($fei), $Handle, 3448439146 )
        _MemoryWrite("0x" & Hex($chuan), $Handle, 2228831605 )
        
  ToolTip("已开启穿透模式", 0, 0)    WEnd
   ToolTip("穿透模式已关闭...", 0, 0);
写回去关闭穿墙
        _MemoryWrite("0x" & Hex($chuan), $Handle, 2228831604 )
        sleep(500)
         ToolTip("", 0, 0)
EndFunc