Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- COLOR 0E
- echo ======================================
- echo Welcome to the Oxide File Modifier
- echo.
- echo The purpose of this script is to
- echo copy the newly compiled Oxide files
- echo into your vanilla Rust Server
- echo Enjoy!
- echo ======================================
- :SETVARS
- SET /p RustLoc=Where are your Rust Files Located?:
- SET /p OxideFiles=Where are your compiled oxide files (the folder with the .sln file)?:
- SET /p OxideUpdtr=What is your compiled oxide patcher directory (the folder with the .sln file)?:
- IF "!RustLoc:~-1!"=="\" SET RustLoc=!RustLoc:~,-1!
- IF "!OxideFiles:~-1!"=="\" SET OxideFiles=!OxideFiles:~,-1!
- IF "!OxideUpdtr:~-1!"=="\" SET OxideUpdtr=!OxideUpdtr:~,-1!
- If Exist "%RustLoc%\RustDedicated.exe" (
- echo Rust Found!
- ) else (
- echo Can't find RustDedicated.exe!
- GOTO SETVARS
- )
- echo Copying over Oxide files....
- @echo on
- copy "%OxideFiles%\Dependencies\lua52.dll" "%RustLoc%\" /Y
- copy "%OxideFiles%\Dependencies\KeraLua.dll" "%RustLoc%\RustDedicated_Data\Managed\" /Y
- copy "%OxideFiles%\Dependencies\KopiLua.dll" "%RustLoc%\RustDedicated_Data\Managed\" /Y
- copy "%OxideFiles%\Dependencies\NLua.dll" "%RustLoc%\RustDedicated_Data\Managed\" /Y
- copy "%OxideFiles%\oxide.root.json" "%RustLoc%\" /Y
- copy "%RustLoc%\RustDedicated_Data\Managed\Oxide.Core.dll" "%OxideUpdtr%\" /Y
- @echo off
- echo Updating Patcher Project...
- @echo off
- setlocal enabledelayedexpansion
- set /p txtfile=Please show me the location of RustExperimental.opj [Including filename]:
- IF "!RustLoc:~-1!"=="\" SET RustLoc=!RustLoc:~,-1!
- set newfile=C:\RustExperimental.opj
- if exist "%newfile%" del /f /q "%newfile%"
- set search="TargetDirectory": "D:\\Oxide\\Rust Server\\Release\\RustDedicated_Data\\Managed",
- set replace="TargetDirectory": "%RustLoc%\RustDedicated_Data\Managed",
- set replace=%replace:\=\\%
- for /f "tokens=*" %%a in (%txtfile%) do (
- set newline=%%a
- set newline=!newline:%search%=%replace%!
- echo !newline! >> %newfile%
- )
- echo Project Updated - Please Load Project C:\RustExperimental.opj to apply the patch...
- %OxideUpdtr%\OxidePatcher.exe
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement