Skip to content

Instantly share code, notes, and snippets.

@nomi-san
Last active December 17, 2022 22:48
Embed
What would you like to do?
Appear offline on League Client

Guides

Run offlol.bat as administrator to appear offline, with any arg to appear online.

$ offlol.bat
Please run as administrator.

admin $ offlol.bat
You will appear offline on League Client.

admin $ offlol.bat on
You will appear online on League Client.

How it works?

The simplest way is block the chat server.
Using ping to get the IP and block it via Windows Firewall.

Server list (in batch file)

BR     br.chat.si.riotgames.com
EUNE   eun1.chat.si.riotgames.com
EUW    euw1.chat.si.riotgames.com
JP     jp1.chat.si.riotgames.com
LAN    la1.chat.si.riotgames.com
LAS    la2.chat.si.riotgames.com
NA     na2.chat.si.riotgames.com
OCE    oc1.chat.si.riotgames.com
PH     ph1.chat.si.riotgames.com
RU     ru1.chat.si.riotgames.com
SG     sg1.chat.si.riotgames.com
TH     th1.chat.si.riotgames.com
TR     tr1.chat.si.riotgames.com
TW     tw1.chat.si.riotgames.com
VN     vn1.chat.si.riotgames.com
@echo off
net SESSION 1>nul 2>nul
if %errorlevel% NEQ 0 (
echo Please run as administrator.
goto end
)
set server=vn1.chat.si.riotgames.com
:: Server list:
:: BR br.chat.si.riotgames.com
:: EUNE eun1.chat.si.riotgames.com
:: EUW euw1.chat.si.riotgames.com
:: JP jp1.chat.si.riotgames.com
:: LAN la1.chat.si.riotgames.com
:: LAS la2.chat.si.riotgames.com
:: NA na2.chat.si.riotgames.com
:: OCE oc1.chat.si.riotgames.com
:: PH ph1.chat.si.riotgames.com
:: RU ru1.chat.si.riotgames.com
:: SG sg1.chat.si.riotgames.com
:: TH th1.chat.si.riotgames.com
:: TR tr1.chat.si.riotgames.com
:: TW tw1.chat.si.riotgames.com
:: VN vn1.chat.si.riotgames.com
FOR /f "tokens=1,3 delims=: " %%A IN ('ping -n 1 %server%') DO (
IF %%A==Reply (
set IP=%%B
)
)
if [%1]==[] (
color 4
netsh advfirewall firewall add rule name="lolchat" dir=out remoteip=%IP% protocol=TCP action=block
echo You will appear offline on League Client.
) else (
color A
netsh advfirewall firewall delete rule name=lolchat
echo You will appear online on League Client.
)
:end
timeout /t 3
@tedomi2705
Copy link

add "-4" argument to ping command so that it can return ipv4 address

@League2EB
Copy link

does's work for garena server?

@tedomi2705
Copy link

does's work for garena server?

it works for every server

@minhminh209
Copy link

omg how can I turn it back online lol I'm stuck

@nomi-san
Copy link
Author

nomi-san commented Aug 7, 2021

omg how can I turn it back online lol I'm stuck

Just unblock the IP in Windows Firewall.

@PascalPT
Copy link

PascalPT commented Mar 30, 2022

The if [%1] thing doesn't work.

Replacing that whole if else statement with this does :

netsh advfirewall firewall show rule name="lolchat" >nul || (
color 4
netsh advfirewall firewall add rule name="lolchat" dir=out remoteip=%IP% protocol=TCP action=block
echo You will appear offline on League Client.
goto end
)
color A
netsh advfirewall firewall delete rule name=lolchat
echo You will appear online on League Client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment