Изменения в скрипте пишу на ходу, если есть косяки, пишите поправлю.(хотя по моему накосячить там не реально)
Для начала копируем библиотеки в папку с рек ботом.
Далее открываем блокнот(ну или любой другой текстовый редактор) и копируем этот код
[attachment=0]LoadClient.zip[/attachment]Code:----============================================================================= -- Requiem game ReqBot service loader script -- --============================================================================= --[[ Loads the Requiem game client "Requiem.exe" with the ReqBot service DLL loaded. This script needs to be passed the game's directory as an argument. I.E. "C:GamesRequiem" Normally setup in a shortcut to call this script from MM with the path from the Windows desktop. An optional 2nd argument "-RU" to indicate the Russian version, or "-GB" to indicate Global Sea server version. By default assumes USA server version. --]] ------------------------------------------------------------------------------- -- C function printf with fore and background colors local function printfc(foreground, background, ...) local szText = nil local function wrapper(...) console.SetColor(foreground, background) io.write(string.format(...)) console.SetColor(console.WHITE, console.BLACK) end local status, err = pcall(wrapper, ...) if not status then error(err, 2) end end -- Get MD5 hash for file, nil on open failure local function GetFileHash(szFile) local bufsize = (64 * 1024) local hFile = io.open(szFile, "rb") if hFile then local MyMD5 = hash.MD5() local szFileData = hFile:read(bufsize) while szFileData do MyMD5:Add(szFileData) szFileData = hFile:read(bufsize) end hFile:close() MyMD5:Finalize() return(tostring(MyMD5)) else return nil, "failed to open file" end end -- Show an error box and exit local function ErrorBox(szError) printfc(console.BRIGHTYELLOW, console.RED, "nn ====== Error ======n"..szError) gui.MessageBox("Game loader Error!", szError, bit.bor(gui.MB_OK, gui.MB_ICONHAND)) os.exit(1) end ------------------------------------------------------------------------------- print() printfc(console.BRIGHTYELLOW, console.BLACK, " ====================== Game Loader ======================") -- #1 -- First argument needs to be the game directory -- Requiem doesn't have a path location in the windows registry so the user must -- supply it. -- Argument #1 is the full script path, #2 is the game path if ((#arg < 2) or (type(arg[2]) ~= "string")) then ErrorBox("Need to pass the game directory as an argument!nnI.E. "MacroMonkey.exe LoadGame.mms C:\Games\Requiem" nNormally setup as a desktop shortcut or batch file.nSee ReqBot "ReadMe.txt"") end -- #2 2nd argument optional server version -- USA version by default local VersionIndex = 1 if arg[3] then if (string.upper(arg[3]) == "-RU") then VersionIndex = 2 elseif (string.upper(arg[3]) == "-GB") then VersionIndex = 3 end print() printfc(console.BRIGHTMAGENTA, console.BLACK, "<%s server version>n", ({"USA", "Russian", "Global Sea"})[VersionIndex]) end local szServiceDLL = ({"RequiemSrvc.dll", "RequiemSrvcRU.dll", "RequiemSrvcGB.dll"})[VersionIndex] local szDLLPath = string.gsub(arg[1], "LoadClient.mms", szServiceDLL) local szGamePath = arg[2] local szClientPath = szGamePath.."\system\Requiem.exe" local szInsDll = "DarkREQ.dll" local szInsPath = szGamePath.."\system\".. szInsDll print() printfc(console.BRIGHTGREEN, console.BLACK, "GP: "%s"n", szGamePath) printfc(console.BRIGHTGREEN, console.BLACK, "CP: "%s"n", szClientPath) printfc(console.BRIGHTGREEN, console.BLACK, "DP: "%s"n", szDLLPath) printfc(console.BRIGHTGREEN, console.BLACK, "DarREQInsider: "%s"n",szInsPath) -- #3 -- The ReqBot service DLL is specific to client version -- The DLL version must match the relative current client. -- Get client hash dofile("ClientVersion.inc") local szClientMD5 = aClientHash[VersionIndex] assert(szClientMD5) -- Compare with actual local szReadHash = GetFileHash(szClientPath) if szReadHash then if (szReadHash ~= szClientMD5) then ErrorBox("Client version check failed! You probably need a ReqBot update. nnDownload the latest service DLL version.nSee ReqBot "ReadMe.txt"") end else ErrorBox("Can't find game client with path: ""..szClientPath..""!nnGame path argument is incorrect, or client EXE is missing..nSee ReqBot "ReadMe.txt"") end -- #4 -- Create game process with service DLL injected.. local szGameArgs = ({ " 128.241.93.161 -FromLauncher 0/0 0 0 1 3 0", -- USA " 109.105.144.2 -FromLauncher 0/0 0 0 7 2 0", -- Russia " 112.175.139.3 -FromLauncher 0/0 0 0 1 4 0", -- Global Sea })[VersionIndex] print("Loading..") local Handle = process.Create(szClientPath, szGameArgs, szGamePath, szDLLPath) if not Handle then ErrorBox("Failed to create client process! nnProbably couldn't find the service DLL. nSee ReqBot "ReadMe.txt"") os.exit(1) end print("Inject dInsider.dll...") -- Иньектим ещё 1 библиотеу. if (process.InjectDLL(Handle, szInsPath ) == false) then ErrorBox("Failed to inject DLL!") os.exit(1) end -- Success, bail out print("nnnnnSuccess") time.Sleep(0.25) --print("n- Press a key to exit -") --console.KeyPause()
Такс скрипт я поменял, и теперь нужно кидать инсайдер в папку река паку system(так же как и для нормального запуска инсайдера)
В тестах наткнулся на проблемку. Хз как решить) попробуйте может она только у меня. Пишет что невозможно применить данный патч. Проверяйте =)
Please register or login to download attachments.