CoolAppear Offline [Toggle Script]

Posts 1–3 of 3 · Page 1 of 1
Appear Offline [Toggle Script]
Appear Offline
If you want to appear offline in league this post is for you!

This method will:
  • Disable Friendlist
  • Disable Friend Chat
  • Disable Lobby Chat



Toggle Script (recommended)
I have created this little Batch script to automatically create and toggle the Appear Offline function whenever executed.
To use it just create a bat file with the following code and execute it to enable and disable the chat respectively. (Or download the attachment and rename it to .bat)

The script does the exact same things as the manual setup and there is no risk or downside to using it.

Code:
::
::
:: (C) 2022 Maurice "AECX" Henke
:: https://henke.gg
:: <maurice@henke.gg>
::
:: Thank you for using my script!
:: If you got any problems feel free to contact me 
::

net session >nul 2>&1
if %errorLevel% == 0 (
    goto Main
) else (
    ECHO:
    ECHO YOU NEED TO RUN THIS SCRIPT AS ADMINISTRATOR
    ECHO:
    color c0
    goto Quit
)

:Main
    netsh advfirewall firewall show rule name="RiotChat" | findstr Enabled: > tempfile
    
    SET empty=""
    SET /p status=<tempfile

    DEL tempfile

    SetLocal EnableDelayedExpansion
    IF "!status!"==!empty! ( goto Create ) ELSE ( goto Toggle )
    EndLocal

goto Quit

:Create
    ECHO:
    ECHO Creating and enabling the firewall rule:
    netsh advfirewall firewall add rule name="RiotChat" dir=out action=block protocol=TCP remoteport=5223
goto Quit


:Toggle
    setlocal EnableDelayedExpansion
        if "!status:Yes=!"=="!status!" ( goto Disable ) ELSE ( goto Enable )
    endlocal

goto Quit

:: 
:: Enable the League chat by disabling
:: the firewall rule
:: 
:Enable
    ECHO Enabling league chat.
    netsh advfirewall firewall set rule name="RiotChat" new enable=no
goto Quit


:: 
:: Disable the League chat by enabling
:: the firewall rule
:: 
:Disable
    ECHO Disabling league chat.
    netsh advfirewall firewall set rule name="RiotChat" new enable=yes
goto Quit




:Quit
    ECHO:
    ECHO Thank you for using my script, glhf!
    timeout /t 3 /nobreak > NUL
    color
Manual Setup
In order to disable the chat we simply block connections to port 5223 as that is used by the Riot Games chat service.

  • Open "Windows Defender Firewall with Advanced Security"
  • Navigate to "Outbound Rules"
  • Create a New Rule
  • Select "Port"
  • Leave everything default and Enter 5223 in the field "Remote Port"
  • Leave the rest default and name your rule


To enable and disable the chat simply toggle the firewall rule you've just created.
League Offline.txt2 KB · 36 downloads Clean
just don't put any download links on the website, the thread will have to be deleted if you do.

//approved
I should add that if your Windows language is not english you will have to adjust the lines 25 and 47.

Please replace the terms "Enabled:" and "Yes" (only the quoted part and nothing else) with whatever matches the output of the commands in your language. (You can try to run the commands manually to identify the translation)

If anyone has a better solution to this, i.e. change the output language of netsh commands or the entire CMD process, please let me know!

Best Regards
AECX
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?