U3Games

Games | Desarrollo & Soporte => L2 | Material adicional => L2 | Sección de Servidores => Lineage => L2 | Anti Cheats => Mensaje iniciado por: Swarlog en Jun 25, 2025, 09:01 PM

Título: Anti-Chat Level
Publicado por: Swarlog en Jun 25, 2025, 09:01 PM
Para que los jugadores que no superen el nivel minimo indicado puedan utilizar el chat o determinados chats.

### by Zoey76
#P L2_GameServer
Index: java/com/l2jserver/gameserver/network/clientpackets/Say2.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/Say2.java    (revision 4422)
+++ java/com/l2jserver/gameserver/network/clientpackets/Say2.java    (working copy)
@@ -196,6 +196,13 @@
         if (Config.USE_SAY_FILTER)
             checkText();
        
+       
+        if ((activeChar.getLevel() < 80) && (_type == TRADE || _type == SHOUT || _type == HERO_VOICE))
+        {
+            activeChar.sendMessage("Shout, trade and hero chatting cannot be used until level 80.");
+            return;
+        }
+       
         IChatHandler handler = ChatHandler.getInstance().getChatHandler(_type);
         if (handler != null)
             handler.handleChat(_type, activeChar, _target, _text);