Skip to content

Instantly share code, notes, and snippets.

@nomi-san
Last active January 29, 2024 09:57
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save nomi-san/2b7f5f920e02880eeea65c995d9131a1 to your computer and use it in GitHub Desktop.
Save nomi-san/2b7f5f920e02880eeea65c995d9131a1 to your computer and use it in GitHub Desktop.
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

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.

@QBidolet
Copy link

You need to block IP v4 and v6 now

ping -4 euw1.chat.si.riotgames.com

netsh advfirewall firewall add rule name="lolchat" dir=out remoteip=172.65.252.238 protocol=TCP action=block

ping euw1.chat.si.riotgames.com

netsh advfirewall firewall add rule name="lolchat" dir=out remoteip=2606:4700:90:0:3b29:9c9f:6acc:698e protocol=TCP action=block

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