i import chat flood protect but idk why its dont accept config delay
i change to 10 min or 1 sec but it still same i do it in java and config but not effect
say2.java
import com.l2.gameserver.util.FloodProtectorConfig;
...................
..........
....
break;
case SHOUT:
if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") ||
(Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_GLOBALCHAT))
{
activeChar.sendMessage("Action failed. Players are only able to use channel once every 20 seconds.");
return;
}
int region = MapRegionTable.getInstance().getMapRegion(activeChar.getX(), activeChar.getY());
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
{
if (region == MapRegionTable.getInstance().getMapRegion(player.getX(),player.getY()))
player.sendPacket(cs);
}
}
else if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("global"))
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_GLOBALCHAT))
{
activeChar.sendMessage("Action failed. Players are only able to use channel once every 20 seconds.");
return;
}
if (activeChar.getPvpKills()< Config.L2JMOD_MIN_PVP_POINTS_TO_TALK)
{
activeChar.sendMessage("You need "+ Integer.toString(Config.L2JMOD_MIN_PVP_POINTS_TO_TALK)+ " pvp points to use Global chat.");
return;
}
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
{
player.sendPacket(cs);
}
}
break;
case TRADE:
if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") ||
(Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_GLOBALCHAT))
{
activeChar.sendMessage("Action failed. Players are only able to use channel once every 20 seconds.");
return;
}
if (activeChar.getPvpKills()< Config.L2JMOD_MIN_PVP_POINTS_TO_TALK)
{
activeChar.sendMessage("You need "+ Integer.toString(Config.L2JMOD_MIN_PVP_POINTS_TO_TALK)+ " pvp points to use Global chat.");
return;
}
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
{
player.sendPacket(cs);
}
} else if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("limited"))
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_GLOBALCHAT))
{
activeChar.sendMessage("Action failed. Players are only able to use channel once every 20 seconds.");
return;
}
int region = MapRegionTable.getInstance().getMapRegion(activeChar.getX(), activeChar.getY());
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
{
if (region == MapRegionTable.getInstance().getMapRegion(player.getX(),player.getY()))
player.sendPacket(cs);
}
}
break;
case ALL:
if (_text.startsWith("."))
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_GLOBALCHAT))
{
activeChar.sendMessage("Action failed. Players are only able to use channel once every 20 seconds.");
return;
}
case HERO_VOICE:
if (activeChar.isGM())
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_HEROVOICE))
{
//Nothing here xD
}
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
if (!BlockList.isBlocked(player, activeChar))
player.sendPacket(cs);
}
else if (activeChar.isHero())
{
if (!FloodProtector.getInstance().tryPerformAction(activeChar.getObjectId(), FloodProtector.PROTECTED_HEROVOICE))
{
activeChar.sendMessage("Action failed. Heroes are only able to speak in the global channel once every 10 seconds.");
return;
}
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
if (!BlockList.isBlocked(player, activeChar))
player.sendPacket(cs);
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Bobi
i import chat flood protect but idk why its dont accept config delay
i change to 10 min or 1 sec but it still same i do it in java and config but not effect
say2.java
config.java
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.