- :: League of Legends Language Unlocker Script v8
- :: By: nothingxs
- :: Twitter: nothingxs / Reddit: http://reddit.com/u/nothingxs
- :: The user does not need to edit anything: simply copy the script to a .bat
- :: file and run it.
- :: New ideas by http://reddit.com/u/Nominance
- ::
- :: Changes in v8
- :: - Bugfixes!
- :: Changes in v7
- :: - Properly implements Delayed Expansion, now properly stores variables in
- :: settings file
- :: - Looks a little prettier and now also includes instructions.
- :: - Will check registry when first initialized; may never need to interact to
- :: set up the program. A lot more user-friendly as a result.
- @ECHO OFF
- COLOR 1F
- SET lusver=v8
- TITLE League of Legends Language Unlocker %lusver%
- SETLOCAL EnableDelayedExpansion
- :: This checks to see if unlocker.ini exists and tries to load your game's path
- :: from it. If it does not find the game there, it will prompt the user to
- :: manually input the path.
- :CHECKSET
- CLS
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ League of Legends Language Unlocker %lusver% ¦
- ECHO +-----------------------------------------------------------------------------+
- IF EXIST .\unlocker.ini GOTO LOAD
- :: First, we're going to check the registry to see if we can find where League
- :: is installed. If we find a path, we don't need to do anything else special.
- :: Some people do run the game off of a flash drive, however, so we want to be
- :: able to set the path manually in that case.
- :REGCHECK
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ No settings file found, checking registry... ¦
- ECHO +-----------------------------------------------------------------------------+
- REG QUERY "HKLM\Software\Wow6432Node\Riot Games\League of Legends">NUL
- IF %ERRORLEVEL% EQU 1 GOTO PROMPT
- :: We found a registry entry that might contain the path. Check that first and
- :: save that to the unlocker.ini settings file, then try to load with that.
- :FETCH
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ Registry entry found. ¦
- ECHO +-----------------------------------------------------------------------------+
- FOR /f "skip=2 tokens=1,2*" %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\Riot Games\League of Legends" /v Path 2^>NUL') DO SET temptarget=%%C
- ECHO !temptarget!>unlocker.ini
- ECHO.
- ECHO ^(!temptarget!^)
- ECHO.
- GOTO LOAD
- :PROMPT
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ Settings file not found. ^(unlocker.ini^) ¦
- ECHO +-----------------------------------------------------------------------------¦
- ECHO ¦ Paste your League of Legends folder location here. ¦
- ECHO ¦ The default is usually C:\Riot Games\League of Legends ¦
- ECHO +-----------------------------------------------------------------------------¦
- ECHO ¦ INSTRUCTIONS ¦
- ECHO ¦ 1^) Locate the folder that contains the file lol.launcher.exe. ¦
- ECHO ¦ 2^) Copy the full path ^(with CTRL+C or right click, copy^). ¦
- ECHO ¦ 3^) Right-click this window and click "Paste", then press Enter / Return. ¦
- ECHO +-----------------------------------------------------------------------------+
- :QUESTION
- ECHO.
- SET /p target=^>
- ECHO !target!>unlocker.ini
- GOTO CHECKSET
- :LOAD
- SET /p target=<unlocker.ini
- IF NOT EXIST "!target!\lol.launcher.exe" (
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ Could not find League of Legends at the saved location. ¦
- ECHO +-----------------------------------------------------------------------------+
- ECHO.
- ECHO ^(!target!^)
- ECHO is not a valid location.
- ECHO.
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ Paste your League of Legends folder location here. ¦
- ECHO ¦ The default is usually C:\Riot Games\League of Legends ¦
- ECHO +-----------------------------------------------------------------------------¦
- ECHO ¦ INSTRUCTIONS: ¦
- ECHO ¦ 1^) Locate the folder that contains the file lol.launcher.exe. ¦
- ECHO ¦ 2^) Copy the full path ^(with CTRL+C or right click, copy^). ¦
- ECHO ¦ 3^) Right-click this window and click "Paste", then press Enter / Return. ¦
- ECHO +-----------------------------------------------------------------------------+
- )
- IF NOT EXIST "!target!\lol.launcher.exe" GOTO QUESTION
- :: This string determines what languages you want to use.
- :: cs_CZ Czech de_DE German
- :: el_GR Greek en_AU English AU
- :: en_GB English UK en_US English US
- :: es_AR Spanish AR es_ES Spanish ES
- :: es_MX Spanish MX fr_FR French
- :: hu_HU Hungarian it_IT Italian
- :: ko_KR Korean pl_PL Polish
- :: pt_BR Portuguese BR ro_RO Romanian
- :: ru_RU Russian tr_TR Turkish
- :: The string must always end in , A
- :: Every pipe character that's used in this string must be escaped.
- SET lollanguages=cs_CZ^|de_DE^|el_GR^|en_AU^|en_GB^|en_US^|es_AR^|es_ES^|es_MX^|fr_FR^|hu_HU^|it_IT^|ko_KR^|pl_PL^|pt_BR^|ro_RO^|ru_RU^|tr_TR, A
- SET regionfile=RADS\projects\lol_patcher\managedfiles\0.0.0.0\regions.txt
- SET regionbackup=RADS\projects\lol_patcher\managedfiles\0.0.0.0\regions-backup.txt
- :: We must set the regions.txt to not be read-only.
- :: We set the file to read-only so that, in the event you forget to run this when
- :: you update League of Legends, you should still be able to play in the language
- :: you want.
- ATTRIB -R "!target!\!regionfile!"
- :: Let's back up the old regions.txt.
- :: This will only happen if regions-backup.txt doesn't already exist.
- :: Idea by /u/Nominance
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ Backing up regions.txt... ¦
- IF NOT EXIST "!target!\!regionbackup!" COPY /Y "!target!\!regionfile!" "!target!\!regionbackup!"
- :: We delete the old regions.txt as we will be writing a new one from scratch.
- ECHO ¦ Deleting old regions.txt file... ¦
- DEL /Q "!target!\!regionfile!"
- :: The following commands write a brand new regions.txt file with all languages
- :: enabled from all available regions.
- ECHO ¦ Writing new regions.txt file with all languages enabled... ¦
- ECHO na, na, !lollanguages! > "!target!\!regionfile!"
- ECHO br, br, !lollanguages! >> "!target!\!regionfile!"
- ECHO tr, tr, !lollanguages! >> "!target!\!regionfile!"
- ECHO euw, euw, !lollanguages! >> "!target!\!regionfile!"
- ECHO eune, eune, !lollanguages! >> "!target!\!regionfile!"
- ECHO ru, ru, !lollanguages! >> "!target!\!regionfile!"
- ECHO la1, la1, !lollanguages! >> "!target!\!regionfile!"
- ECHO la2, la2, !lollanguages! >> "!target!\!regionfile!"
- ECHO oc1, oc1, !lollanguages! >> "!target!\!regionfile!"
- ECHO ¦ Write complete. ¦
- :: We set the new regions.txt as read-only.
- ECHO +-----------------------------------------------------------------------------+
- ATTRIB +R "!target!\!regionfile!"
- :: The below shows you what languages are installed.
- :: Some of the languages just show like an "empty" row in the language/region
- :: selection. When you run this script, the following will tell you what those
- :: languages are. There's also multiple entries for English and Spanish, so you
- :: can also know which of the varieties of languages you're using.
- CLS
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ League of Legends Language Unlocker %lusver% ¦
- ECHO +-----------------------------------------------------------------------------+
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ LANGUAGES ¦
- ECHO +-----------------------------------------------------------------------------¦
- ECHO ¦ Czech, German, Greek, English (AU), English (UK), English (NA), ¦
- ECHO ¦ Spanish (AR), Spanish (ES), Spanish (MX), French, Hungarian, Italian, ¦
- ECHO ¦ Korean, Polish, Portuguese (BR), Romanian, Russian, Turkish ¦
- ECHO +-----------------------------------------------------------------------------+
- ECHO.
- :: The following starts League of Legends and pauses this screen so that you can
- :: view the list of languages, in case you need to.
- ECHO +-----------------------------------------------------------------------------+
- ECHO ¦ Starting League of Legends... ¦
- ECHO +-----------------------------------------------------------------------------+
- START /D"!target!\" lol.launcher.exe
- ECHO.
- ECHO.
- ECHO.
- ECHO (You can press any key to close this window.)
- PAUSE > NUL
Undefined
By: Guest | Date: Aug 14 2015 22:25 | Format: None | Expires: never | Size: 9.75 KB | Hits: 1016
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago