-
Posts
72 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by LucasDesigner
-
Gente venho aqui disponibilizar esse mod aio por clan retirei o mod a rev project x .. img do funcionamento Index: config/other.properties =================================================================== --- config/other.properties(wersja 309) +++ config/other.properties(kopia robocza) # Aio Buffers can speak to Class Master? AllowAioUseClassMaster = False + +#MembersCount AIO CLAN SELLER +AioClanMembers = 1 Index: head-src/com/l2jfrozen/config.java =================================================================== --- head-src/com/l2jfrozen/config.java (revision 1118) +++ head-src/com/l2jfrozen/config.java (working copy) public static boolean ALLOW_AIO_USE_GK; public static boolean ALLOW_AIO_USE_CM; +public static int AIO_CLAN_MEMBERS; ALLOW_AIO_USE_GK = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseGk", "False")); ALLOW_AIO_USE_CM = Boolean.parseBoolean(otherSettings.getProperty("AllowAioUseClassMaster", "False")); +AIO_CLAN_MEMBERS = Integer.parseInt(otherSettings.getProperty("AioClanMembers", "10")); Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2AioInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2AioInstance.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2AioInstance.java (working copy) package com.l2jsoft.gameserver.model.actor.instance; import com.l2jsoft.Config; import com.l2jsoft.gameserver.ai.CtrlIntention; import com.l2jsoft.gameserver.ai.L2CharacterAI; import com.l2jsoft.gameserver.model.*; import com.l2jsoft.gameserver.model.actor.appearance.PcAppearance; import com.l2jsoft.gameserver.model.actor.stat.PcStat; import com.l2jsoft.gameserver.network.SystemMessageId; import com.l2jsoft.gameserver.network.serverpackets.*; import com.l2jsoft.gameserver.templates.L2NpcTemplate; import java.util.StringTokenizer; // Referenced classes of package com.l2jfrozen.gameserver.model.actor.instance: // L2FolkInstance, L2PcInstance, L2ItemInstance public class L2AioInstance extends L2FolkInstance { public L2AioInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } public void onAction(L2PcInstance player) { if(!canTarget(player)) return; player.setLastFolkNPC(this); if(this != player.getTarget()) { player.setTarget(this); MyTargetSelected my = new MyTargetSelected(getObjectId(), 0); player.sendPacket(my); my = null; player.sendPacket(new ValidateLocation(this)); } else if(!canInteract(player)) player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); else showMessageWindow(player); player.sendPacket(ActionFailed.STATIC_PACKET); } private void showMessageWindow(L2PcInstance player) { String filename = "data/html/Aio_clan/aioseller.htm"; NpcHtmlMessage html = new NpcHtmlMessage(1); html.setFile(filename); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%servername%", Config.ALT_Server_Name); player.sendPacket(html); filename = null; html = null; } public void onBypassFeedback(L2PcInstance player, String command) { if(command.startsWith("add_aio")) { StringTokenizer st = new StringTokenizer(command); st.nextToken(); String priceId = null; String priceCount = null; String time = null; int aioPriceId = 0; int aioPriceCount = 0; int aioTime = 0; if(st.hasMoreTokens()) { priceId = st.nextToken(); priceCount = st.nextToken(); time = st.nextToken(); try { aioPriceId = Integer.parseInt(priceId); aioPriceCount = Integer.parseInt(priceCount); aioTime = Integer.parseInt(time); } catch(NumberFormatException numberformatexception) { } } else { _log.warning((new StringBuilder()).append("Could not update aio status of player ").append(player.getName()).toString()); return; } makeAioCharacter(player, aioPriceId, aioPriceCount, aioTime); } else if(command.startsWith("remove_aio")) removeAio(player); showMessageWindow(player); } public void makeAioCharacter(L2PcInstance player, int itemId, int itemCount, int aioTime) { L2ItemInstance itemInstance = player.getInventory().getItemByItemId(itemId); if(itemInstance == null || !itemInstance.isStackable() && player.isClanLeader() && player.getInventory().getInventoryItemCount(itemId, -1) < itemCount) { player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS)); player.sendMessage("SYS: Clan Leader not receive Aiox! 1"); return; } if(itemInstance.isStackable() && player.isClanLeader()) { if(!player.destroyItemByItemId("Aio", itemId, itemCount, player.getTarget(), true)) { player.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS)); player.sendMessage("SYS: Clan Leader not receive Aiox! 2"); } } else { for(int i = 0; i < itemCount; i++) player.destroyItemByItemId("Aio", itemId, 1, player.getTarget(), true); } doAio(player, aioTime); } public void doAio(L2PcInstance player, int days) { if(player == null) return; if(player.getClan() != null && player.getClan().getMembersCount() >= Config.AIO_CLAN_MEMBERS) { if(player.isAio()) player.broadcastUserInfo(); else nameChanger("[AIO]", player); player.setAio(true); player.setEndTime("aio", days); if(Config.ALLOW_AIO_NCOLOR && player.isAio()) player.getAppearance().setNameColor(Config.AIO_NCOLOR); if(Config.ALLOW_AIO_TCOLOR && player.isAio()) player.getAppearance().setTitleColor(Config.AIO_TCOLOR); /* Give Aio Dual */ L2ItemInstance item; if(player.getInventory().getItemByItemId(Config.DUAL_AIO_ID) == null) { item = player.getInventory().addItem("", Config.DUAL_AIO_ID, 1, player, null); InventoryUpdate iu = new InventoryUpdate(); iu.addItem(item); player.sendPacket(iu); } player.rewardAioSkills(); player.sendPacket(new EtcStatusUpdate(player)); player.getStat().addExp(player.getStat().getExpForLevel(81)); player.broadcastPacket(new SocialAction(player.getObjectId(), 16)); player.sendSkillList(); player.broadcastUserInfo(); player.sendMessage("SYS: You are now an Aio, Congratulations!"); } else { player.sendMessage("SYS: You must be a member of a Clan."); player.sendMessage("SYS: The Clan has to have at the minimum members online!"); } } public void removeAio(L2PcInstance player) { if(!player.isAio()) { player.sendMessage("You are not an AIO."); return; } else { player.setAio(false); player.setAioEndTime(0L); player.getAppearance().setNameColor(0xffffff); player.getAppearance().setTitleColor(0xffff77); player.getWarehouse().destroyItemByItemId("", Config.DUAL_AIO_ID, 1, player, null); L2ItemInstance item = player.getInventory().destroyItemByItemId("", Config.DUAL_AIO_ID, 1, player, null); InventoryUpdate iu = new InventoryUpdate(); iu.addItem(item); player.sendPacket(iu); player.lostAioSkills(); player.sendPacket(new EtcStatusUpdate(player)); player.getStat().removeExp(player.getStat().getExpForLevel(81)); player.broadcastPacket(new SocialAction(player.getObjectId(), 16)); player.sendSkillList(); player.sendMessage("Now You are not an Aio.."); player.broadcastUserInfo(); return; } } public static void nameChanger(String ReplaceName, L2PcInstance player) { if(ReplaceName == null || ReplaceName == "" || player == null) return; String BitchName = player.getName(); String DaBitchRenamed = (new StringBuilder()).append(ReplaceName).append(BitchName).toString(); player.setName(DaBitchRenamed); player.broadcastUserInfo(); if(player.getClan() != null) player.getClan().broadcastClanStatus(); } } Index: data/html/Aio_clan/aioseller.htm =================================================================== --- data/html/Aio_clan/aioseller.htm (revision 0) +++ data/html/Aio_clan/aioseller.htm (working copy) <html> <body><title>Aio Clan Special</title> <head> <html> <body> <center><br> <img src="l2font-e.replay_logo-e" width=255 height=60> <center> <table> <tr> <td><img src="icon.etc_alphabet_a_i00" width=32 height=32 align="center"></td> <td><img src="icon.etc_alphabet_r_i00" width=32 height=32 align="center"></td> <td><img src="icon.etc_alphabet_c_i00" width=32 height=32 align="center"></td> <td><img src="icon.etc_alphabet_a_i00" width=32 height=32 align="center"></td> <td><img src="icon.etc_alphabet_d_i00" width=32 height=32 align="center"></td> <td><img src="icon.etc_alphabet_i_i00" width=32 height=32 align="center"></td> <td><img src="icon.etc_alphabet_a_i00" width=32 height=32 align="center"></td> </tr> </table> <br><br> <font color=D2691E>1) Player receiving Aiox need to be active in <font color="LEVEL">'Clan'</font></td><BR> <font color=D2691E>2) Clan need <font color="LEVEL">'25'</font> or more <font color="LEVEL">Clan Members Online.</font></td><BR> <font color=D2691E>3) Clan Leader not receive Aiox or <font color="LEVEL">'Clan Remove'</font></td><BR> _______________________________<br1> <TABLE border=0 width=180> <TR> <TD width=32 height=32><CENTER><img src="L2UI_CH3.bloodhood_icon02" width=32 height=32></CENTER></TD> <TD><font color=99FF00>Free Aio Clan</a></font> <FONT COLOR="99FF00">Members Online</FONT></TD> </TR> <br> </table> <br> <center> <table border="0" cellspacing="0"> <tr> <td valign=top><img src=icon.skill1087 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1036 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1243 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1033 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1303 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1035 width=32 height=32 align=left></td> </tr> <tr> <td valign=top><img src=icon.skill1078 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1085 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1059 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1352 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1259 width=32 height=32 align=left></td> <td valign=top><img src=icon.skill1393 width=32 height=32 align=left></td> </tr> <br><br> </table> _______________________________<br1> <br><br> <td><button value="Aiox 1 Days" action="bypass -h npc_%objectId%_add_aio 57 1 1" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"><br> <br></body> </center> </html> INSERT INTO `custom_npc` VALUES ('55055', '31113', 'Marramed', '1', 'AIO CLAN', '1', 'Monster.death_knight', '22.00', '18.00', '70', 'male', 'L2Aio', '40', '25563', '1111', '111.00', '1.00', '40', '40', '40', '40', '40', '40', '40', '40', '40', '40', '40', '40', '40', '0', '40', '0', '0', '0', '0', '120', null, null, '0', '0', 'LAST_HIT'); Creditos Mod : Project-x // HedHot Creditor remoção e adptçao : Lucasdesigner
-
Share 10 Amazing Lineage 2 Website Psd's
LucasDesigner replied to Lelouch's topic in Website Templates & Themes (Free)
What is the name of the font used on the web Blade rush -
Hey guys never knew you had not thought here souger123 had already posted. More ta ai download the 3 NPCs for you guys Aioseller, Vipseller and RegisterSiege It also works in acis just switch sports UPDATE NPC AIO SELLER AND LANGUAGE EN EN It also works in acis just switch sports in .java exchange import net.xline by import net.sf.l2j IMG 1 IMG 2 IMG 3 NPC AIO SELLER PT-EN Download creditos @author : TiTaM creditos por adaptar : Marcos-Sayan creditos ;Souger123 e BossForever
-
Code Newbie Player's Auto Buffs
LucasDesigner replied to iSparky's topic in Server Shares & Files [L2J]
Creditos : RedHot -
Code 12:00;14:25,23:12 Task Scheduler
LucasDesigner replied to An4rchy's topic in Server Shares & Files [L2J]
could better explain the fucionabilidade ... -
Code [Share]Sit,stand,rangesit,rangestand Admin Commands
LucasDesigner replied to Vkouk's topic in Server Shares & Files [L2J]
this mod is incomplete .. which coordinate to add it? -
I am here to provide an awesome site for L2J !!! The site has the following scripts: Registry System Rankings PVP, PK, Recomend. Population. Players Online. Download Templante Download PSD Tabela de Languages
-
People come here makes a contribution but mine. Mod Administrator born with super rod MOD DONE PRA L2JFROZEN. Index: config/functions/access.properties =================================================================== GMStartupInvulnerable = True + +# Add Super Haste skill on GM login. +GMStartupSuperHaste = True Index: trunk/gameserver/head-src/com/l2jfrozen/Config.java =================================================================== public static boolean GM_STARTUP_INVISIBLE; +public static boolean GM_SUPER_HASTE; GM_STARTUP_INVULNERABLE = Boolean.parseBoolean(AccessSettings.getProperty("GMStartupInvulnerable", "true")); +GM_SUPER_HASTE = Boolean.parseBoolean(AccessSettings.getProperty("GMStartupSuperHaste", "False")); Index: trunk/gameserver/head-src/com/l2jfrozen/network/clientpackets/enterword.java ==================================================================== if (Config.GM_STARTUP_INVULNERABLE && AdminCommandAccessRights.getInstance().hasAccess("admin_invul", activeChar.getAccessLevel())) activeChar.setIsInvul(true); +if(Config.GM_SUPER_HASTE) +SkillTable.getInstance().getInfo(7029, 4).getEffects(activeChar, activeChar); Note: those who do not use L2JFrozen basic correctness + if(Config.GM_SUPER_HASTE) +{ + SkillTable.getInstance().getInfo(7029, 4).getEffects(activeChar, activeChar); +} Creditos : RevL2jbr , LovePako
-
Eu usei esse código e eu tentei adptar para l2jfrozen , mas eu tenho erros no servidor run fonte original. Index: config/protected/other.properties =================================================================== --- config/protected/other.properties (revision 991) +++ config/protected/other.properties (working copy) @@ -39,6 +39,9 @@ AllowDualBoxInOly = False AllowDualBoxInEvent = False +# Multbox protection based on client tracert comparison +MultiBoxesPerPC = 2 + #=================================# # Bot Protection # #=================================# Index: head-src/com/l2jfrozen/Config.java =================================================================== --- head-src/com/l2jfrozen/Config.java (revision 991) +++ head-src/com/l2jfrozen/Config.java (working copy) @@ -608,7 +608,8 @@ public static String CHAT_FILTER_CHARS; public static String CHAT_FILTER_PUNISHMENT; public static ArrayList<String> FILTER_LIST = new ArrayList<String>(); - + public static int MAX_PLAYERS_FROM_ONE_PC; + public static int FS_TIME_ATTACK; public static int FS_TIME_COOLDOWN; public static int FS_TIME_ENTRY; @@ -3445,7 +3446,7 @@ ALLOW_DUALBOX_EVENT = Boolean.parseBoolean(POtherSetting.getProperty("AllowDualBoxInEvent", "True")); ALLOWED_BOXES = Integer.parseInt(POtherSetting.getProperty("AllowedBoxes", "99")); ALLOW_DUALBOX = Boolean.parseBoolean(POtherSetting.getProperty("AllowDualBox", "True")); - + MAX_PLAYERS_FROM_ONE_PC = Integer.parseInt(POtherSetting.getProperty("MultiboxesPerPC", "2")); BOT_PROTECTOR = Boolean.parseBoolean(POtherSetting.getProperty("BotProtect", "False")); BOT_PROTECTOR_FIRST_CHECK = Integer.parseInt(POtherSetting.getProperty("BotProtectFirstCheck", "15")); BOT_PROTECTOR_NEXT_CHECK = Integer.parseInt(POtherSetting.getProperty("BotProtectNextCheck", "60")); @@ -5323,6 +5324,7 @@ { TVT_REVIVE_DELAY = Long.parseLong(pValue); } + else if (pName.equalsIgnoreCase("MultiBoxesPerPC")) MAX_PLAYERS_FROM_ONE_PC = Integer.parseInt(pValue); else if(pName.equalsIgnoreCase("MinKarma")) { KARMA_MIN_KARMA = Integer.parseInt(pValue); Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 4348) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -164,6 +164,7 @@ import com.l2jserver.gameserver.model.quest.State; import com.l2jserver.gameserver.model.zone.type.L2BossZone; import com.l2jserver.gameserver.network.L2GameClient; +import com.l2jserver.gameserver.network.MultiBoxProtection; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.communityserver.CommunityServerThread; import com.l2jserver.gameserver.network.communityserver.writepackets.WorldInfo; @@ -11964,6 +11965,19 @@ _log.log(Level.SEVERE, "deleteMe()", e); } + try + { + if (Config.MAX_PLAYERS_FROM_ONE_PC > 0 && getClient() != null + && getClient().getAdress() != null && getClient().getTrace() != null) + { + MultiBoxProtection.getInstance().removeConnection(getClient()); + } + } + catch (Exception e) + { + _log.log(Level.SEVERE, "deleteMe()", e); + } + // Close the connection with the client closeNetConnection(closeClient); Index: head-src/com/l2jfrozen/gameserver/network/L2GameClient.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/L2GameClient.java (revision 991) +++ head-src/com/l2jfrozen/gameserver/network/L2GameClient.java (working copy) @@ -93,6 +93,7 @@ // Info public String accountName; + private String _adress; public SessionKey sessionId; public L2PcInstance activeChar; private ReentrantLock _activeCharLock = new ReentrantLock(); @@ -110,7 +111,7 @@ // Crypt public GameCrypt crypt; - + private int[][] trace; // Flood protection public long packetsNextSendTick = 0; @@ -130,6 +131,8 @@ public L2GameClient(MMOConnection<L2GameClient> con) { super(con); + if (con != null) + _adress = con.getInetAddress().getHostAddress(); state = GameClientState.CONNECTED; _connectionstartTime = System.currentTimeMillis(); crypt = new GameCrypt(); @@ -233,6 +236,10 @@ return accountName; } + public String getAdress() + { + return _adress; + } public void setSessionId(SessionKey sk) { sessionId = sk; @@ -973,8 +980,15 @@ //Decrease boxes number if(player._active_boxes!=-1) player.decreaseBoxes(); + if (Config.MAX_PLAYERS_FROM_ONE_PC > 0) + { + MultiBoxProtection.getInstance().removeConnection(L2GameClient.this); + } + if (Config.MAX_PLAYERS_FROM_ONE_PC > 0 && !isDetached()) + { + MultiBoxProtection.getInstance().removeConnection(L2GameClient.this); + } - if(!player.isKicked() && !Olympiad.getInstance().isRegistered(player) && !player.isInOlympiadMode() && !player.isInFunEvent() @@ -1211,6 +1226,14 @@ _queueLock.unlock(); } } + public void setClientTracert(int[][] tracert) + { + trace = tracert; + } + public int[][] getTrace() + { + return trace; + } /** * @return the _forcedToClose Index: head-src/com/l2jfrozen/gameserver/network/MultiBoxProtection.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/MultiBoxProtection.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/network/MultiBoxProtection.java (revision 0) @@ -0,0 +1,155 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <http://www.gnu.org/licenses/>. + */ +package com.l2jfrozen.gameserver.network; + + +import java.util.Arrays; +import java.util.Map; +import java.util.logging.Logger; +import com.l2jfrozen.Config; + +import javolution.util.FastMap; + + +/** + * @author LucasDesigner + * + */ +public class MultiBoxProtection +{ + protected static final Logger _log = Logger.getLogger(MultiBoxProtection.class.getName()); + private Map<IpPack, Integer> map; + + public static MultiBoxProtection getInstance() + { + return SingletonHolder._instance; + } + + public MultiBoxProtection() + { + map = new FastMap<MultiBoxProtection.IpPack, Integer>(); + } + + public synchronized boolean registerNewConnection(L2GameClient client) + { + IpPack pack = new IpPack(client.getAdress(), client.getTrace()); + Integer count = map.get(pack); + if (count == null) + { + count = 1; + map.put(pack, count); + if (Config.DEVELOPER) + _log.info("MultiBoxProtection.registerNewConnection(): Set Count for: "+ client.getActiveChar().getName() +" (" + client.getAdress() + ") to " + count); + return true; + } + else if (count < Config.MAX_PLAYERS_FROM_ONE_PC) + { + count++; + map.put(pack, count); + if (Config.DEVELOPER) + _log.info("MultiBoxProtection.registerNewConnection(): Increase Count for: "+ client.getActiveChar().getName() +" (" + client.getAdress() + ") to " + count); + return true; + } + else + { + count++; + map.put(pack, count); + if (Config.DEVELOPER) + _log.info("MultiBoxProtection.registerNewConnection(): Count for: "+ client.getActiveChar().getName() +" (" + client.getAdress() + ") is " + count); + return false; + } + + } + + public synchronized void removeConnection(L2GameClient client) + { + if (client == null) + return; + + IpPack pack = new IpPack(client.getAdress(), client.getTrace()); + Integer count = map.get(pack); + if (count != null && count > 1) + { + count--; + map.put(pack, count); + if (Config.DEVELOPER) + _log.info("MultiBoxProtection.removeConnection(): Decrease Count for: "+ client.getActiveChar().getName() +" (" + client.getAdress() + ") to " + count); + + } + else + { + map.remove(pack); + if (Config.DEVELOPER) + _log.info("MultiBoxProtection.removeConnection(): Remove Count for: "+ client.getActiveChar().getName() +" (" + client.getAdress() + ")"); + } + } + + @SuppressWarnings("synthetic-access") + private static class SingletonHolder + { + protected static final MultiBoxProtection _instance = new MultiBoxProtection(); + } + + public final static class IpPack + { + String ip; + int[][] tracert; + + public IpPack(String ip, int[][] tracert) + { + this.ip = ip; + this.tracert = tracert; + } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + ((ip == null) ? 0 : ip.hashCode()); + if(tracert == null) + return result; + for (int[] array: tracert) + result = prime * result + Arrays.hashCode(array); + return result; + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + IpPack other = (IpPack) obj; + if (ip == null) + { + if (other.ip != null) + return false; + } + else if (!ip.equals(other.ip)) + return false; + for (int i = 0 ; i < tracert.length; i++) + for (int o = 0; o < tracert[0].length; o++) + if (tracert[i][o] != other.tracert[i][o]) + return false; + return true; + } + + } +} + Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 991) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -68,6 +68,7 @@ import com.l2jfrozen.gameserver.model.entity.siege.Siege; import com.l2jfrozen.gameserver.model.quest.Quest; import com.l2jfrozen.gameserver.model.quest.QuestState; +import com.l2jfrozen.gameserver.network.MultiBoxProtection; import com.l2jfrozen.gameserver.network.Disconnection; import com.l2jfrozen.gameserver.network.SystemMessageId; import com.l2jfrozen.gameserver.network.serverpackets.ClientSetTime; @@ -121,7 +122,7 @@ @Override protected void runImpl() { - L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getClient().getActiveChar(); if (activeChar == null) { @@ -422,6 +422,23 @@ activeChar.sendMessage("I'm sorry, but multibox is not allowed here."); activeChar.logout(); } + if (Config.MAX_PLAYERS_FROM_ONE_PC > 0) + { + if (!MultiBoxProtection.getInstance().registerNewConnection(getClient())) + { + activeChar.sendMessage("Too many connections, please logout other characters first."); + if (Config.DEVELOPER) + _log.info("Too many conections, disconnecting " + activeChar.getName()); + ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() + { + public void run() + { + activeChar.logout(false); + } + }, 400); + return; + } + } Hellows(activeChar); Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRestart.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRestart.java (revision 991) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRestart.java (working copy) @@ -25,11 +25,14 @@ import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.model.Inventory; import com.l2jfrozen.gameserver.model.L2Party; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; import com.l2jfrozen.gameserver.model.entity.sevensigns.SevenSignsFestival; import com.l2jfrozen.gameserver.network.L2GameClient; +import com.l2jfrozen.gameserver.network.MultiBoxProtection; import com.l2jfrozen.gameserver.network.L2GameClient.GameClientState; import com.l2jfrozen.gameserver.network.SystemMessageId; import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; @@ -177,7 +187,11 @@ } L2GameClient client = getClient(); - + + if (Config.MAX_PLAYERS_FROM_ONE_PC > 0) + { + MultiBoxProtection.getInstance().removeConnection(client); + } // detach the client from the char so that the connection isnt closed in the deleteMe player.setClient(null);
-
We'm l2off and tou server with a doubt wanted to let the char born with 20 HOW DO LEVEL
-
General Information Server Rates Xp Rate x 100 Sp Rate x 100 Adena Drop x500 Party XP x5 Party SP x5 Enchant Rates Safe enchant +4 Max Weapons enchant +21 Max Joias / Armor enchant + 10 Normal scroll chance - 75 % Blessed scroll chance - 85% Custom Features NO Custom Items Tattos C3 Retail Quest Nobles Custom Events TVT Event DM Event Custom Systems Vote reward system Teleport protection from flagged players Global chat channel for top pvp players Custom Areas Farm Zones Coall Minas Farm Zones Antharas Lair Custom NPC Comsumables Armor & Weapons Npc S.A Special Itens GK Global Other Features Custom Items Clan Penalty - No Penalty Ally Penalty Grade Penalty Spawn Protection = 20sec Sistema AIOx AutoAnnucio SubClass Free www.l2beserk.com
-
www.l2advanced.com server inaugura dia 13/08/11 Confira !!!!
-
L2J which revision you are using the l2mk can talk?
