I've searched with this topic already. There was a topic but couldn't have the answer I anticipated.
So I ask it.
Now, dualbox counts offline traders too.
So, if you allow only 2 chars per an IP, you can only have an active char in live server what if you have already an offline trader.
But I wanna make the dualbox will whitelist offline traders.
Waiting for ur replies. thanks.
Dualbox and offline traders
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
- Zoey76
- L2j Inner Circle
- Posts: 7008
- Joined: Tue Aug 11, 2009 3:36 am
Re: Dualbox and offline traders
I think it's possible and there should be a config for this, I'll check now.
Powered by Eclipse 4.34
| Eclipse Temurin 21
| MariaDB 11.3.2
| L2J Server 2.6.3.0 - High Five 
Join our Discord! 

- Zoey76
- L2j Inner Circle
- Posts: 7008
- Joined: Tue Aug 11, 2009 3:36 am
Re: Dualbox and offline traders
Check this
Gist by: Zoey76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/L2J_Server/java/com/l2jserver/gameserver/instancemanager/AntiFeedManager.java b/L2J_Server/java/com/l2jserver/gameserver/instancemanager/AntiFeedManager.java | |
index 640e00e..1e6ccb4 100644 | |
--- a/L2J_Server/java/com/l2jserver/gameserver/instancemanager/AntiFeedManager.java | |
+++ b/L2J_Server/java/com/l2jserver/gameserver/instancemanager/AntiFeedManager.java | |
@@ -147,6 +147,11 @@ | |
return false; // unable to determine IP address | |
} | |
+ if (max <= 0) | |
+ { | |
+ return true; | |
+ } | |
+ | |
final Map<Integer, AtomicInteger> event = _eventIPs.get(eventId); | |
if (event == null) | |
{ | |
diff --git a/L2J_Server/java/com/l2jserver/gameserver/model/entity/L2Event.java b/L2J_Server/java/com/l2jserver/gameserver/model/entity/L2Event.java | |
index cddc1da..1800e05 100644 | |
--- a/L2J_Server/java/com/l2jserver/gameserver/model/entity/L2Event.java | |
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/entity/L2Event.java | |
@@ -262,7 +262,7 @@ | |
return; | |
} | |
- if ((Config.L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP)) | |
+ if (AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP)) | |
{ | |
_registeredPlayers.add(player); | |
} | |
diff --git a/L2J_Server/java/com/l2jserver/gameserver/model/olympiad/OlympiadManager.java b/L2J_Server/java/com/l2jserver/gameserver/model/olympiad/OlympiadManager.java | |
index 508f0d1..e7dd73a 100644 | |
--- a/L2J_Server/java/com/l2jserver/gameserver/model/olympiad/OlympiadManager.java | |
+++ b/L2J_Server/java/com/l2jserver/gameserver/model/olympiad/OlympiadManager.java | |
@@ -535,7 +535,7 @@ | |
return false; | |
} | |
- if ((Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.OLYMPIAD_ID, noble, Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)) | |
+ if (!AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.OLYMPIAD_ID, noble, Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP)) | |
{ | |
final NpcHtmlMessage message = new NpcHtmlMessage(player.getLastHtmlActionOriginId()); | |
message.setFile(player.getHtmlPrefix(), "data/html/mods/OlympiadIPRestriction.htm"); | |
diff --git a/L2J_Server/java/com/l2jserver/gameserver/network/L2GameClient.java b/L2J_Server/java/com/l2jserver/gameserver/network/L2GameClient.java | |
index 83c9f64..b96268f 100644 | |
--- a/L2J_Server/java/com/l2jserver/gameserver/network/L2GameClient.java | |
+++ b/L2J_Server/java/com/l2jserver/gameserver/network/L2GameClient.java | |
@@ -779,6 +779,7 @@ | |
{ | |
getActiveChar().leaveParty(); | |
OlympiadManager.getInstance().unRegisterNoble(getActiveChar()); | |
+ AntiFeedManager.getInstance().onDisconnect(L2GameClient.this); | |
// If the L2PcInstance has Pet, unsummon it | |
if (getActiveChar().hasSummon()) | |
diff --git a/L2J_Server/java/com/l2jserver/gameserver/network/clientpackets/CharacterSelect.java b/L2J_Server/java/com/l2jserver/gameserver/network/clientpackets/CharacterSelect.java | |
index 51736c0..2b22259 100644 | |
--- a/L2J_Server/java/com/l2jserver/gameserver/network/clientpackets/CharacterSelect.java | |
+++ b/L2J_Server/java/com/l2jserver/gameserver/network/clientpackets/CharacterSelect.java | |
@@ -118,7 +118,7 @@ | |
return; | |
} | |
- if ((Config.L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddClient(AntiFeedManager.GAME_ID, client, Config.L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP)) | |
+ if (!AntiFeedManager.getInstance().tryAddClient(AntiFeedManager.GAME_ID, client, Config.L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP)) | |
{ | |
final NpcHtmlMessage msg = new NpcHtmlMessage(); | |
msg.setFile(info.getHtmlPrefix(), "data/html/mods/IPRestriction.htm"); | |
diff --git a/L2J_DataPack/dist/game/data/scripts/custom/events/TvT/TvTManager/TvTManager.java b/L2J_DataPack/dist/game/data/scripts/custom/events/TvT/TvTManager/TvTManager.java | |
index 0567e0f..1aa5ff9 100644 | |
--- a/L2J_DataPack/dist/game/data/scripts/custom/events/TvT/TvTManager/TvTManager.java | |
+++ b/L2J_DataPack/dist/game/data/scripts/custom/events/TvT/TvTManager/TvTManager.java | |
@@ -96,7 +96,7 @@ | |
htmltext = getHtm(player.getHtmlPrefix(), "TeamsFull.html"); | |
htmltext = htmltext.replaceAll("%max%", String.valueOf(Config.TVT_EVENT_MAX_PLAYERS_IN_TEAMS)); | |
} | |
- else if ((Config.TVT_EVENT_MAX_PARTICIPANTS_PER_IP > 0) && !AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.TVT_ID, player, Config.TVT_EVENT_MAX_PARTICIPANTS_PER_IP)) | |
+ else if (!AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.TVT_ID, player, Config.TVT_EVENT_MAX_PARTICIPANTS_PER_IP)) | |
{ | |
htmltext = getHtm(player.getHtmlPrefix(), "IPRestriction.html"); | |
htmltext = htmltext.replaceAll("%max%", String.valueOf(AntiFeedManager.getInstance().getLimit(player, Config.TVT_EVENT_MAX_PARTICIPANTS_PER_IP))); |
Powered by Eclipse 4.34
| Eclipse Temurin 21
| MariaDB 11.3.2
| L2J Server 2.6.3.0 - High Five 
Join our Discord! 

-
- Posts: 22
- Joined: Mon Jun 09, 2014 4:55 pm
Re: Dualbox and offline traders
Thank you very much! Im gonna try it!