Авторизация
Подписчики
0
Показ онлайна в правом верхнем углу
Описание
данный мод показывать онлайн в клиенте правом верхнем углу код для L2jFrozen
данный код позволит на вашем сервере в клиенте показать онлайн сервера места PcBang поинтов .
так начнем :
diff серверной части :
===================================================================--- config/fun/pcBang.properties (revision 193)+++ config/fun/pcBang.properties (revision 196)@@ -5,7 +5,7 @@ # Pc Bang Point are special points, XML id= 65436 # Enable PC Bang Point Event. # Default: False-PcBangPointEnable = True+PcBangPointEnable = False # Min Player Level. # Default: 20Index: config/frozen/frozen.properties===================================================================--- config/frozen/frozen.properties (revision 13)+++ config/frozen/frozen.properties (revision 16)@@ -31,4 +31,8 @@ # New players get fireworks the first time they log in # Default: False-NewPlayerEffect = True\ No newline at end of file+NewPlayerEffect = True++# It will show at right side in a box of pcbang +# The number of online players.+EnableOnlineRightSide = True\ No newline at end of fileIndex: head-src/com/l2jfrozen/gameserver/network/serverpackets/ExOnlineInfo.java===================================================================--- head-src/com/l2jfrozen/gameserver/network/serverpackets/ExOnlineInfo.java (revision 0)+++ head-src/com/l2jfrozen/gameserver/network/serverpackets/ExOnlineInfo.java (revision 16)@@ -0,0 +1,33 @@+package com.l2jfrozen.gameserver.network.serverpackets;++import com.l2jfrozen.gameserver.model.L2World;+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;+++public class ExOnlineInfo extends L2GameServerPacket+{+ /** The Constant _S__FE_31_EXPCCAFEPOINTINFO. */+ private static final String _S__FE_31_EXPCCAFEPOINTINFO = "[S] FE:31 ExOnlineInfo";++ + public ExOnlineInfo()+ {}+ + @Override+ protected void writeImpl()+ {+ writeC(0xFE);+ writeH(0x31);+ writeD(L2World.getInstance().getAllPlayers().size());+ writeD(1);+ writeC(1);+ writeD(1);+ writeC(1);+ }++ @Override+ public String getType()+ {+ return _S__FE_31_EXPCCAFEPOINTINFO;+ }+}Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/Logout.java===================================================================--- head-src/com/l2jfrozen/gameserver/network/clientpackets/Logout.java (revision 13)+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/Logout.java (revision 16)@@ -20,6 +20,7 @@ import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.model.L2Party;+import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; import com.l2jfrozen.gameserver.model.entity.sevensigns.SevenSignsFestival;@@ -132,6 +133,13 @@ RegionBBSManager.getInstance().changeCommunityBoard(); player.deleteMe();+ + if(Config.ONLINE_RIGHT){+ for(L2PcInstance playr : L2World.getInstance().getAllPlayers())+ {+ playr.showOnlinesWindow();+ }+ } } @OverrideIndex: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java===================================================================--- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 13)+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 16)@@ -330,6 +330,14 @@ if (Config.PCB_ENABLE) activeChar.showPcBangWindow();+ + if(Config.ONLINE_RIGHT){+ for(L2PcInstance player : L2World.getInstance().getAllPlayers())+ {+ player.showOnlinesWindow();+ }+ }+ if (Config.ANNOUNCE_CASTLE_LORDS) notifyCastleOwner(activeChar);Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRestart.java===================================================================--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRestart.java (revision 13)+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRestart.java (revision 16)@@ -26,6 +26,7 @@ import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.model.Inventory; import com.l2jfrozen.gameserver.model.L2Party;+import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; import com.l2jfrozen.gameserver.model.entity.sevensigns.SevenSignsFestival;@@ -160,6 +161,7 @@ player.onTradeCancel(player.getActiveRequester()); } + // Check if player are flying if(player.isFlying()) {@@ -205,6 +207,13 @@ CharSelectInfo cl = new CharSelectInfo(client.getAccountName(), client.getSessionId().playOkID1); sendPacket(cl); client.setCharSelection(cl.getCharInfo());+ + if(Config.ONLINE_RIGHT){+ for(L2PcInstance playr : L2World.getInstance().getAllPlayers())+ {+ playr.showOnlinesWindow();+ }+ } } @OverrideIndex: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java===================================================================--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 13)+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 16)@@ -166,6 +166,7 @@ import com.l2jfrozen.gameserver.network.serverpackets.ExFishingStart; import com.l2jfrozen.gameserver.network.serverpackets.ExOlympiadMode; import com.l2jfrozen.gameserver.network.serverpackets.ExOlympiadUserInfo;+import com.l2jfrozen.gameserver.network.serverpackets.ExOnlineInfo; import com.l2jfrozen.gameserver.network.serverpackets.ExPCCafePointInfo; import com.l2jfrozen.gameserver.network.serverpackets.ExSetCompassZoneCode; import com.l2jfrozen.gameserver.network.serverpackets.FriendList;@@ -18267,6 +18268,13 @@ ExPCCafePointInfo wnd = new ExPCCafePointInfo(this, 0, false, 24, false); sendPacket(wnd); }+ public void showOnlinesWindow()+ {+ /*user, int modify, boolean add, int hour, boolean _double) **/+ + ExOnlineInfo wnd = new ExOnlineInfo();+ sendPacket(wnd);+ } /** * String to hex.Index: head-src/com/l2jfrozen/Config.java===================================================================--- head-src/com/l2jfrozen/Config.java (revision 13)+++ head-src/com/l2jfrozen/Config.java (revision 16)@@ -2124,6 +2124,7 @@ public static String PM_TEXT1; public static String PM_TEXT2; public static boolean NEW_PLAYER_EFFECT;+ public static boolean ONLINE_RIGHT; //============================================================@@ -2138,6 +2139,7 @@ frozenSettings.load(is); is.close(); + ONLINE_RIGHT = Boolean.parseBoolean(frozenSettings.getProperty("EnableOnlineRightSide", "True")); TRANSFORM_PK = Boolean.parseBoolean(frozenSettings.getProperty("EnableTransformPK", "False")); TRANSFORM_NPC_ID = frozenSettings.getProperty("TransformNPCID", "14040"); TRANSFORM_NPC_NAME = frozenSettings.getProperty("TransformNPCName", "Zombie");
после этого идет редактировать клиентскую часть :
открываем :
systemmsg-e.dat
удаляем - добавляем +
1704 1 Please close the the setup window for your private manufacturing store or private store, and try again. 0 79 9B B0 FF 0 0 0 0 0 none-1705 1 PC Bang Points acquisition period. Points acquisition period left $s1 hour. 0 79 9B B0 FF 0 0 0 0 0 none-1706 1 PC Bang Points use period. Points use period left $s1 hour. 0 79 9B B0 FF 0 0 0 0 0 none-1707 1 You acquired $s1 PC Bang Point. 0 79 9B B0 FF 0 0 0 0 0 none+1705 1 It Shows Online Players Count ATM. 0 79 9B B0 FF 0 0 0 0 0 none+1706 1 It Shows Online Players Count ATM. 0 79 9B B0 FF 0 0 0 0 0 none+1707 1 It Shows Online Players Count ATM. 0 79 9B B0 FF 0 0 0 0 0 none
потом открываем :
sysstring-e.dat
1274 Forced Petition1275 Server Transfer1276 - Selection --1277 PC Bang Points+1277 Online Players1278 One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten
и все будет показывать так :
Рекомендуемые комментарии
Комментариев нет