Jump to content

Recommended Posts

  • 1 month later...
  • 1 month later...
Posted

The only problem is that the anti-flood system does not work. Anyone able to add and anti-flood system still work?

 

I await an answer!

 

Thats your problem if you cant patch a file not the problem of the patch itself.

Posted

That's right, I'm that with this problem. Below is my script like this. Some friend of the forum here, could you help me?

 

Be very grateful! Intrepid, Congratulations for your system.

 

I await a response

 

Index: C:/Projeto_L2JServer/workspace/L2J_DataPack/data/scripts/handlers/chathandlers/ChatTrade.java
===================================================================
--- C:/Projeto_L2JServer/workspace/L2J_DataPack/data/scripts/handlers/chathandlers/ChatTrade.java	(revision 7785)
+++ C:/Projeto_L2JServer/workspace/L2J_DataPack/data/scripts/handlers/chathandlers/ChatTrade.java	(working copy)
@@ -16,10 +16,7 @@

import java.util.Collection;

-import com.l2jserver.Config;
-import com.l2jserver.gameserver.datatables.MapRegionTable;
import com.l2jserver.gameserver.handler.IChatHandler;
-import com.l2jserver.gameserver.model.BlockList;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
@@ -43,32 +40,13 @@
	 */
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
-		CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
-		
-		Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
-		
-		if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
+		if((activeChar.getPvpKills() >= 1000) || (activeChar.isGM()))
		{
-			int region = MapRegionTable.getInstance().getMapRegion(activeChar.getX(), activeChar.getY());
+			CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
+		
+			Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
			for (L2PcInstance player : pls)
-			{
-				if (region == MapRegionTable.getInstance().getMapRegion(player.getX(), player.getY()) && !BlockList.isBlocked(player, activeChar) && player.getInstanceId() == activeChar.getInstanceId())
-					player.sendPacket(cs);
-			}
-		}
-		else if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("global"))
-		{
-			if (!activeChar.isGM() && !activeChar.getFloodProtectors().getGlobalChat().tryPerformAction("global chat"))
-			{
-				activeChar.sendMessage("Do not spam trade channel.");
-				return;
-			}
-			
-			for (L2PcInstance player : pls)
-			{
-				if (!BlockList.isBlocked(player, activeChar))
-					player.sendPacket(cs);
-			}
+				player.sendPacket(cs);
		}
	}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock