Jump to content

Recommended Posts

Posted

Geia se olous, 8a ithela na kanw share to Flood Protection rework, pou einai aparaitito gia ola ta interludes :D. Prostateuei ton server apo bugs, spams, lags.


Einai reworked gia Interlude to Gracia Final to exei idi


1. ) Arxizoume kanontas delete to old FloodProtection sosta ? :D

2. ) As arxisoume, prota kanoume delete to Support apo to L2PcInstance gia to old floodprotection

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
@@ -201,5 +201,4 @@
import net.sf.l2j.gameserver.templates.L2WeaponType;
import net.sf.l2j.gameserver.util.Broadcast;
-import net.sf.l2j.gameserver.util.FloodProtector;
import net.sf.l2j.util.Point3D;
import net.sf.l2j.util.Rnd;
@@ -10883,6 +10883,5 @@
			// Close the connection with the client
			closeNetConnection();
-			// remove from flood protector
-			FloodProtector.getInstance().removePlayer(getObjectId());
+			
			if (getClanId() > 0)
			{

 

3. ) Tora kanoume delete to arxeio pou legete Floodprotector.java kai vriskete sto gameserver/util .Tora tha svisete oti protection exete valei se opio file exete valei apo to palio Flood Protection.

 

4. ) Ora na valoume to kainourio Mas FloodProtection System

Edo to code: FloodProtection Rework

 

5. ) Ora na prostateusoume ta arxeia pou theloume

Ena paradeigma: ( sto proigoumeno diff vriskete to support, omws tha sas dei3w pos ginete add se periptosi p thelete na kanete kai alla protections:

 

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 423)
@@ -17,4 +17,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -60,4 +62,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getServerBypass().tryPerformAction("_command"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null)

NOTE: "Actionfailed.STATIC_PACKET " can be changed to new ActionFaled()); without harming the code.
		{

 

Support: Prota anoigoume to arxeio FloodProtection.java Vazoume ta lines:

Stin arxi ( Mporeite na dite pou einai kai ta alla paromoia me auto to code )

+	/**
+	 * Server-bypass flood protector.
+	 */
+	private final FloodProtectorAction _serverBypass;

Edo meta gia na sindethei me ta Configs ( mporeite na deite pou akrivos tha to valete apo olokliro to code sto Proto diff.

+		_serverBypass = new FloodProtectorAction(player, Config.FLOOD_PROTECTOR_SERVER_BYPASS);

Auto sto telos.

+	/**
+	 * Returns {@link #_serverBypass}.
+	 * 
+	 * @return {@link #_serverBypass}
+	 */
+	public FloodProtectorAction getServerBypass()
+	{
+		return _serverBypass;
+	}

Auto itan ena paradeigma.

 

Prostateuste ta ipoloipa arxeia, deite to parakato to diff exei ta protections gia kapoia files. to Support tous sto FloodProtection / Config einai idi added sto proto diff

Ipoloipa protections: http://www.4shared.com/file/184891519/dbc74782/Protectingit.html

 

Next page :D

Posted

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 423)
@@ -17,4 +17,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -60,4 +62,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getServerBypass().tryPerformAction("_command"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java (revision 423)
@@ -84,4 +84,9 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 423)
@@ -30,4 +30,5 @@
import net.sf.l2j.gameserver.model.item.PcInventory;
import net.sf.l2j.gameserver.network.SystemMessageId;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
import net.sf.l2j.gameserver.network.serverpackets.PledgeShowInfoUpdate;
@@ -90,4 +91,9 @@
	private void doExchange(L2PcInstance player, MultiSellEntry templateEntry, boolean applyTaxes, boolean maintainEnchantment, int enchantment)
	{
+		if (!player.getFloodProtectors().getMultisell().tryPerformAction("multisell"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		PcInventory inv = player.getInventory();
		boolean maintainItemFound = false;
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 423)
@@ -72,4 +72,12 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
+		
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (revision 423)
@@ -26,4 +26,5 @@
import net.sf.l2j.gameserver.model.item.ItemContainer;
import net.sf.l2j.gameserver.network.SystemMessageId;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
@@ -84,4 +85,9 @@
		{
			player.sendMessage("Transactions are disable for your Access Level");
+			return;
+		}
+		if (!player.getFloodProtectors().getWerehouse().tryPerformAction("werehouse"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 423)
@@ -89,4 +89,11 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java (revision 423)
@@ -18,4 +18,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -56,4 +58,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null)
			return;
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java (revision 423)
@@ -17,4 +17,6 @@
import java.util.logging.Logger;

+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
+
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.GmListTable;
@@ -61,4 +63,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getDropItem().tryPerformAction("drop"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null || activeChar.isDead())
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java (revision 423)
@@ -25,4 +25,5 @@
import net.sf.l2j.gameserver.handler.IChatHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

/**
@@ -85,4 +86,13 @@
		// getting char instance
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (activeChar != null && activeChar instanceof L2PcInstance)
+		{
+			if (!activeChar.getFloodProtectors().getChat().tryPerformAction("chat"))
+			{
+				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
+		}
		if (_text.length() >= 100)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java (revision 423)
@@ -61,4 +61,10 @@
		else
			target = L2World.getInstance().findObject(_objectId);
+		// Update next commit
+		// if (!activeChar.getFloodProtectors().getActionMwx().tryPerformAction("_objectId"))
+		// {
+		//	activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+		//	return;
+		// }
		if (target == null)
			return;
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java (revision 423)
@@ -83,4 +83,11 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 423)
@@ -16,4 +16,6 @@

import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -410,4 +412,11 @@
					activeChar.sendPacket(sm);
				}
+				
+				if (!activeChar.getFloodProtectors().getWerehouse().tryPerformAction("werehouse"))
+				{
+					activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+					return;
+				}
+				
				item.setEnchantLevel(item.getEnchantLevel() + 1);
				item.updateDatabase();
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java (revision 423)
@@ -60,4 +60,9 @@
		if (activeChar == null)
			return;
+		if (!activeChar.getFloodProtectors().getUseItem().tryPerformAction("use item"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (activeChar.getPrivateStoreType() != 0)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java (revision 423)
@@ -18,4 +18,6 @@
import java.util.concurrent.ScheduledFuture;

+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
+
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.datatables.NpcBufferSkillIdsTable;
@@ -191,4 +193,9 @@
		if (command.startsWith("npc_buffer_heal"))
		{
+			if (!playerInstance.getFloodProtectors().getBuffer().tryPerformAction("npc_buffer_heal"))
+			{
+				playerInstance.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			if (playerInstance.getCurrentHp() == 0 || playerInstance.getPvpFlag() > 0)
			{
@@ -204,4 +211,9 @@
		if (command.startsWith("npc_buffer_cancel"))
		{
+			if (!playerInstance.getFloodProtectors().getBuffer().tryPerformAction("npc_buffer_cancel"))
+			{
+				playerInstance.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			if (playerInstance.getCurrentHp() == 0 || playerInstance.getPvpFlag() > 0)
			{
@@ -215,4 +227,9 @@
		if (command.startsWith("npc_buffer_buff"))
		{
+			if (!playerInstance.getFloodProtectors().getBuffer().tryPerformAction("npc_buffer_buff"))
+			{
+				playerInstance.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			String[] params = command.split(" ");
			int skillId = Integer.parseInt(params[1]);
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 423)
@@ -2814,4 +2814,6 @@
		if (player == null)
			return;
+		if (!player.getFloodProtectors().getSubclass().tryPerformAction("buffer"))
+			return;
		// Blessing of protection - author kerberos_20. Used codes from Rayan - L2Emu project.
		int player_level = player.getLevel();
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 423)
@@ -285,4 +285,12 @@
				case 4: // Add Subclass - Action (Subclass 4 x[x])
					boolean allowAddition = true;
+					
+					if (!player.getFloodProtectors().getSubclass().tryPerformAction("add subclass"))
+					{
+						player.sendMessage("Don't change sub classes so rapidly, please wait.");
+						player.sendPacket(ActionFailed.STATIC_PACKET);
+						return;
+					}
+					
					/*
					 * If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice.
@@ -373,4 +381,10 @@
					 * If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice. Note: paramOne = classIndex
					 */
+					if (!player.getFloodProtectors().getSubclass().tryPerformAction("change class"))
+					{
+						player.sendMessage("Don't change sub classes so rapidly, please wait.");
+						player.sendPacket(ActionFailed.STATIC_PACKET);
+						return;
+					}
					if (Olympiad.getInstance().isRegisteredInComp(player) || (player.getOlympiadGameId() > 0))
					{
@@ -407,4 +421,10 @@
					 * Warning: the information about this subclass will be removed from the subclass list even if false!
					 */
+					if (!player.getFloodProtectors().getSubclass().tryPerformAction("change class"))
+					{
+						player.sendMessage("Don't change sub classes so rapidly, please wait.");
+						player.sendPacket(ActionFailed.STATIC_PACKET);
+						return;
+					}
					if (Olympiad.getInstance().isRegisteredInComp(player) || (player.getOlympiadGameId() > 0))
					{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (revision 423)
@@ -58,4 +58,9 @@
		}
		L2PcInstance activeChar = (L2PcInstance) playable;
+		if (!activeChar.getFloodProtectors().getItemPetSummon().tryPerformAction("summon items"))
+		{
+			playable.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (activeChar.isSitting())
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/Firework.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/Firework.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/Firework.java (revision 423)
@@ -14,4 +14,6 @@
 */
package net.sf.l2j.gameserver.handler.itemhandlers;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.gameserver.datatables.SkillTable;
@@ -39,4 +41,49 @@
		L2PcInstance activeChar = (L2PcInstance) playable;
		int itemId = item.getItemId();
+		if (!activeChar.getFloodProtectors().getFirework().tryPerformAction("firework"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}

		/*
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/RollingDice.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/RollingDice.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/RollingDice.java (revision 423)
@@ -69,4 +69,6 @@
	private int rollDice(L2PcInstance player)
	{
+		if (!player.getFloodProtectors().getRollDice().tryPerformAction("roll dice"))
+			return 0;
		// Check if the dice is ready
		return Rnd.get(1, 6);
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Banking.java
===================================================================
--- /trunk/v/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Banking.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Banking.java (revision 423)
@@ -14,4 +14,6 @@
 */
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -34,4 +36,9 @@
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
	{
+		if (!activeChar.getFloodProtectors().getBankingSystem().tryPerformAction("BankingSystem"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return false;
+		}
		if (command.equalsIgnoreCase("bank"))
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (revision 423)
@@ -20,4 +20,5 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

@@ -38,4 +39,9 @@
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
+		if (!activeChar.getFloodProtectors().getGlobal().tryPerformAction("global"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
		if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java
===================================================================
--- /trunk/v/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (revision 423)
@@ -14,4 +14,6 @@
 */
package net.sf.l2j.gameserver.handler.chathandlers;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -38,4 +40,9 @@
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
+		if (!activeChar.getFloodProtectors().getGlobal().tryPerformAction("global"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
		if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java (revision 423)
@@ -19,4 +19,5 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

@@ -37,6 +38,11 @@
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
-		if (activeChar.isHero())
+		if (activeChar.isHero() || activeChar.isGM ())
		{
+			if (!activeChar.getFloodProtectors().getHeroVoice().tryPerformAction("hero voice") && !activeChar.isGM())
+			{
+				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
			for (L2PcInstance player : L2World.getInstance().getAllPlayers())
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/RecipeController.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/RecipeController.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/RecipeController.java (revision 423)
@@ -193,4 +193,9 @@
	public synchronized void requestMakeItem(L2PcInstance player, int recipeListId)
	{
+		if (!player.getFloodProtectors().getCraft().tryPerformAction("craft"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (player.isInDuel())
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/util/FloodProtectors.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/util/FloodProtectors.java (revision 422)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/util/FloodProtectors.java (revision 423)
@@ -15,4 +15,6 @@
package  net.sf.l2j.gameserver.util;

+import net.sf.l2j.gameserver.util.FloodProtectorAction;
+
import  net.sf.l2j.Config;
import  net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

Credits: L2J kai se emena gia to rework sto Interlude.

Posted

NC...Man thelw na se rotisw kati , ama kses...kita ,egw exw interlude server kai thelw na perasw kati weapons....exw kai to (edit file) briskw to arxio [itemname-e.dat] & to [weapongrp.dat]  mesa sto fakelo system kai den borw na to aniksw gia na perasw ta items pou thelw...mipos kses pos to kanw?

Posted

NC...Man thelw na se rotisw kati , ama kses...kita ,egw exw interlude server kai thelw na perasw kati weapons....exw kai to (edit file) briskw to arxio [itemname-e.dat] & to [weapongrp.dat]  mesa sto fakelo system kai den borw na to aniksw gia na perasw ta items pou thelw...mipos kses pos to kanw?

Auto dn kolaei pouthena, psa3e sto MXC iparxoun Guides.

Posted

Einai olo-diko mou ! To ekana monos rework apo Gracia final gia Interlude.

 

lol to patch tou intrepid phres kai 2 sync apo to forum ths l2j.

akoma kai to paneykolo rework (pou to ousiastiko rework einai na vgaleis to floodprotector) den htan diko sou.

Posted

lol to patch tou intrepid phres kai 2 sync apo to forum ths l2j.

akoma kai to paneykolo rework (pou to ousiastiko rework einai na vgaleis to floodprotector) den htan diko sou.

Min arxisoume pali, e3igisa ston Intrepid oti dn einai diko tou.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Get in touch via Discord, I created the autofarm you are looking for.   discord: admkelly
    • Classic move "its not a virus, all antiviruses are just wrong." The moment someone starts yelling "FIND THE MALICIOUS CODE" and mocking heuristic detection, its usually because there is something shady in there… or they have no clue what heuristic detection even is. If your files was clean, you wouldn’t be this defensive or getting personal.   when half the AV vendors are throwing out names like Trojan.Win32.Kasidet, Trj/Chgt.AD, and Gen:Variant.Tedy.537463, maybe it’s not "heuristics", maybe its just a shady-ass .rar. If there is smoke you don't argue with the smoke detector, you check the kitchen. But hey, maybe they all got paid too, right? 🤷‍♂️ the argue comes down to trusting you (a nobody) versus AV vendors   Popular threat label trojan.tedy Threat categories trojan  Family labels tedy   can i call you Teddy from now on? yes i can Teddy               Dont forget it was not something generic or maybe suspicious it just got detected with its specific version. and not only Teddy's Teddy some others too Kaspersky says Kasidet trojan keylogger, spyware, classic nasty stuff. Bitdefender, GData, VIPRE? Tedy variant, an actual known malware family. Panda, QuickHeal, Sophos, Fortinet everyone sees something dirty in there. But sure, they’re all wrong, and you’re the cybersecurity messiah who cracked the code. You really expect people to believe that 10 independent vendors with zero incentive to conspire against your .rar just happened to flag your file as malware… by accident? Maybe try this next time: instead of uploading garbage and calling people “idiots” when they don’t trust it, just don’t upload malware. Problem solved.
    • https://github.com/gawric/Guide-L2Unity/blob/main/Guide/Pakets/Blowfish/General description.md   Perhaps you will find it useful piece of encryption and decryption code from Acis Interlude   I transferred these methods to Unity c# and everything works fine   https://ibb.co/DHhP0JYr   I think the first 2 bytes are the packet size. Third byte packet id And then the information itself   It's all there in l2j servers  
    • Hello everyone, I'm facing exactly the same issue mentioned in this topic. I've correctly implemented several new mounts in my Lineage 2 Interlude server, but whenever I use the ride/mount action, the client always displays the default strider animation (lineagemonster.strider_m00), even though in my npcgrp.dat everything is correctly referenced to my custom ride.u files (e.g., ride.wolfhound_m00).   90102 Rider.wing_hound_vehicle Riders.wing_hound_vehicle_m00 2 RidersTex.wing_hound_t00 RidersTex.wing_hound_t01 0 1 0 1.00000000 0 1 4 ItemSound.armor_metal_weak_1 ItemSound.armor_leather_3 ItemSound.armor_metal_weak_3 ItemSound.armor_metal_weak_5 3 MonSound12.w_hound_dmg_1 MonSound12.w_hound_dmg_2 MonSound12.w_hound_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41000 Rider.gray_horse Riders.gray_horse_m00 3 RidersTex.gray_horse.gray_horse_t00 RidersTex.gray_horse.gray_horse_t01 RidersTex.gray_horse.gray_horse_t02 0 1 0 1.05882394 0 1 4 MonSound.Hit_Shell_1 MonSound.Hit_normal_3 MonSound.Hit_Wood_3 MonSound.Hit_normal_12 3 MonSound.unicorn_b_dmg_1 MonSound.unicorn_b_dmg_2 MonSound.unicorn_b_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41001 Rider.tawny_maned_lion Riders.tawny_maned_lion_m00 3 RidersTex.tawny_maned_lion.tawny_maned_lion_t00 RidersTex.tawny_maned_lion.tawny_maned_lion_t01 RidersTex.tawny_maned_lion.tawny_maned_lion_t02 0 1 0 1.50000000 0 1 5 MonSound.Hit_normal_12 MonSound.Hit_Normal_1 MonSound.Hit_Shell_3 MonSound.Hit_Shell_4 MonSound.Hit_Wet_4 3 MonSound.strider_dmg_1 MonSound.strider_dmg_2 MonSound.strider_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41002 Rider.steam_sledge Riders.steam_sledge_m00 4 RidersTex.steam_sledge.steam_sledge_t00 RidersTex.steam_sledge.steam_sledge_t01 RidersTex.steam_sledge.steam_sledge_t02 RidersTex.steam_sledge.steam_sledge_t03 0 1 0 1.50000000 0 1 5 ItemSound.armor_metal_weak_3 ItemSound.armor_metal_weak_5 ItemSound.armor_metal_weak_10 ItemSound.armor_metal_alt_1 ItemSound.armor_metal_alt_6 3 MonSound.iron_golem_breathe MonSound.iron_golem_dmg_2 MonSound.iron_golem_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41003 Rider.br_z_bike Riders.br_z_bike_m00 1 RidersTex.npc.br_z_bike_t00 0 1 0 1.00000000 0 1 5 MonSound.Hit_wood_1 MonSound.Hit_Wood_2 MonSound.Hit_Wood_3 MonSound.Hit_Wood_4 MonSound.Hit_Wood_5 0 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41004 Rider.br_g_ant_princess Riders.g_ant_princess_m00 3 RidersTex.Npc.g_ant_princess_t00 RidersTex.Npc.g_ant_princess_t01 RidersTex.Npc.g_ant_princess_t02 0 1 0 1.39999998 0 1 4 MonSound.Hit_Normal_10 MonSound.Hit_Shell_2 MonSound.Hit_Wet_5 ItemSound.shield_bone_1 3 MonSound.queen_ant_dmg_1 MonSound.queen_ant_dmg_2 MonSound.queen_ant_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41005 Rider.br_g_black_bear Riders.g_black_bear 2 RidersTex.Npc.g_black_bear_t00 RidersTex.Npc.g_black_bear_t01 0 1 0 1.39999998 0 1 4 MonSound.Hit_Normal_11 MonSound.Hit_Normal_13 MonSound.Hit_Wet_5 ItemSound.shield_bone_3 3 MonSound11.Kerberos_dmg01 MonSound11.Kerberos_dmg02 MonSound11.Kerberos_dmg03 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41006 Rider.br_g_halloween_flying_broom Riders.g_halloween_flying_broom_m00 1 RidersTex.Npc.g_halloween_flying_broom 0 1 0 1.39999998 0 1 5 MonSound.Hit_wood_1 MonSound.Hit_Wood_2 MonSound.Hit_Wood_3 MonSound.Hit_Wood_4 MonSound.Hit_Wood_5 0 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41007 Rider.illusion_vehicle Riders.illusion_vehicle_m00 2 RidersTex.bird_vehicle.bird_vehicle_t00 RidersTex.bird_vehicle.bird_vehicle_t01 0 1 0 1.05882394 0 1 4 MonSound.Hit_normal_3 MonSound.Hit_Wet_1 MonSound.Hit_Bone_2 MonSound.Hit_normal_12 0 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41008 Rider.vehicle_lindvior Riders.vehicle_lindvior_m00 2 RidersTex.Vehicle_Lindvior.Vehicle_Lindvior_t00 RidersTex.Vehicle_Lindvior.Vehicle_Lindvior_t01 0 1 0 1.05882394 0 1 4 MonSound.Hit_Normal_1 MonSound.Hit_Wet_3 MonSound.Hit_Bone_8 MonSound.Hit_Wet_5 3 MonSound3.dragon_mage_dmg_1 MonSound3.dragon_mage_dmg_2 MonSound3.dragon_mage_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41009 Rider.craft_vehicle_dwarf Riders.craft_vehicle_dwarf_m00 2 RidersTex.craft_vehicle_dwarf.craft_vehicle_dwarf_t00 RidersTex.craft_vehicle_dwarf.craft_vehicle_dwarf_t01 0 1 0 1.05882394 0 1 4 MonSound.Hit_Normal_1 MonSound.Hit_Wood_2 MonSound.Hit_Wood_3 MonSound.Hit_Normal_7 0 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41010 Rider.eligor_vehicle Riders.eligor_vehicle_m00 2 RidersTex.eligor_vehicle.eligor_vehicle_t00 RidersTex.eligor_vehicle.eligor_vehicle_t01 0 1 0 1.00000000 0 1 4 MonSound.Hit_normal_3 MonSound.Hit_Wet_1 MonSound.Hit_Bone_2 MonSound.Hit_normal_12 3 MonSound16.kanilof_dmg_1 MonSound16.kanilof_dmg_2 MonSound16.kanilof_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41011 Rider.elder_pegasus_vehicle Riders.elder_pegasus_vehicle_m00 2 RidersTex.elder_pegasus_vehicle.elder_pegasus_event_vehicle_t00 RidersTex.elder_pegasus_vehicle.elder_pegasus_event_vehicle_t01 0 1 0 1.00000000 0 1 5 MonSound.Hit_Normal_1 MonSound.Hit_Normal_6 MonSound.Hit_Normal_7 MonSound.Hit_Normal_8 MonSound.Hit_normal_12 3 MonSound12.cobalt_horse_dmg_1 MonSound12.cobalt_horse_dmg_2 MonSound12.cobalt_horse_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41012 Rider.wing_hound_vehicle Riders.wing_hound_vehicle_m00 2 RidersTex.wing_hound_t00 RidersTex.wing_hound_t01 0 1 0 1.00000000 0 1 4 ItemSound.armor_metal_weak_1 ItemSound.armor_leather_3 ItemSound.armor_metal_weak_3 ItemSound.armor_metal_weak_5 3 MonSound12.w_hound_dmg_1 MonSound12.w_hound_dmg_2 MonSound12.w_hound_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 41013 Rider.sp_griffin_vehicle Riders.sp_griffin_vehicle_m00 3 RidersTex.griffin_vehicle.griffin_vehicle_t00 RidersTex.griffin_vehicle.griffin_vehicle_t01 RidersTex.griffin_vehicle.griffin_vehicle_t02 0 1 0 1.00000000 0 1 5 MonSound.Hit_Normal_1 MonSound.Hit_Normal_6 MonSound.Hit_Normal_7 MonSound.Hit_Normal_8 MonSound.Hit_normal_12 3 MonSound23.sp_griffin_dmg_1 MonSound23.sp_griffin_dmg_2 MonSound23.sp_griffin_dmg_3 0 1 0 LineageEffect.p_u002_a 0 50.00000000 250.00000000 70.00000000 0 1 I've examined the server-side code and realized the problem likely comes from the client only looking at the _rideType (which is 1 for STRIDER) and ignoring the _rideNpcId when determining which animation to load. @Banshee Garnet mentioned an "extended dll" - does this involve modifying the L2.dll or L2Client.dll so it checks the NpcId in addition to the rideType? Has anyone already made this modification and could share more details on how to proceed? Looking at l2royale.com, I can see they indeed have multiple functional mounts in their Interlude client. I'd like to understand which approach they used: Is it indeed a DLL modification? Which specific parts of the DLL need to be modified? Are there already patches or tools that allow adding this functionality? If anyone has successfully implemented multiple mounts in Interlude or knows the precise technical solution, I would be very grateful for any information or help. Thanks in advance!
  • Topics

×
×
  • Create New...