Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Fake Players Online

Iniciado por Swarlog, Ago 19, 2022, 12:58 AM

Tema anterior - Siguiente tema

Swarlog

### Eclipse Workspace Patch 1.0
#P L2jFrozen_gameserver
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 1068)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy)
@@ -565,7 +565,18 @@
  sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("Welcome to " + Config.ALT_Server_Name));
 
  if (Config.ONLINE_PLAYERS_ON_LOGIN)
- sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + L2World.getInstance().getAllPlayers().size() + " players online."));
+ {
+ if(Config.ADDFAKEPLAYERSMODE)
+ {
+ int playerSizeOnline = L2World.getInstance().getAllPlayers().size() + Config.ADDFAKEPLAYERSNUMBER;
+ sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + playerSizeOnline + " players online."));
+ }
+
+ else
+ {
+ sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + L2World.getInstance().getAllPlayers().size() + " players online."));
+ }
+ }
 
  if (activeChar.getFirstLog() && Config.NEW_PLAYER_EFFECT)
  {
Index: config/functions/l2jfrozen.properties
===================================================================
--- config/functions/l2jfrozen.properties (revision 1068)
+++ config/functions/l2jfrozen.properties (working copy)
@@ -280,4 +280,9 @@
 ProtectorSkillLevel = 13
 ProtectorSkillTime = 600
 # Npc Protector Message
-ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
\ No newline at end of file
+ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
+
+# This mode is if you want to increase,
+# the count number of the players, who are online.
+FakePlayersSystem = False
+NumberPlussForFakePlayers = 0;
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java (revision 1068)
+++ head-src/com/l2jfrozen/Config.java (working copy)
@@ -2398,6 +2398,9 @@
  public static String FARM2_CUSTOM_MESSAGE;
  public static String PVP1_CUSTOM_MESSAGE;
  public static String PVP2_CUSTOM_MESSAGE;
+
+ public static boolean ADDFAKEPLAYERSMODE;
+ public static int ADDFAKEPLAYERSNUMBER;
 
  //============================================================
  public static void loadL2JFrozenConfig()
@@ -2517,6 +2520,9 @@
  FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
  PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
  PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
+
+ ADDFAKEPLAYERSMODE  = Boolean.parseBoolean(L2JFrozenSettings.getProperty("FakePlayersSystem", "False"));
+ ADDFAKEPLAYERSNUMBER = Integer.parseInt(L2JFrozenSettings.getProperty("NumberPlussForFakePlayers", "0"));
  }
  catch(Exception e)
  {
Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Online.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Online.java (revision 1068)
+++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Online.java (working copy)
@@ -14,6 +14,7 @@
  */
 package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
 
+import com.l2jfrozen.Config;
 import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
 import com.l2jfrozen.gameserver.model.L2World;
 import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
@@ -30,9 +31,16 @@
  {
  if(command.equalsIgnoreCase("online"))
  {
- activeChar.sendMessage("======<Players Online!>======");
- activeChar.sendMessage("There are " + L2World.getInstance().getAllPlayers().size() + " players online!.");
- activeChar.sendMessage("=======================");
+ if(Config.ADDFAKEPLAYERSMODE)
+ {
+ int playerSizeOnline = L2World.getInstance().getAllPlayers().size() + Config.ADDFAKEPLAYERSNUMBER;
+ activeChar.sendMessage("There are " + playerSizeOnline + " players online!");
+ }
+
+ else
+ {
+ activeChar.sendMessage("There are " + L2World.getInstance().getAllPlayers().size() + " players online!");
+ }
  }
  return true;
  }

Muestra la cantidad de jugadores adicional que tu quieras, ejemplo... hay 10 jugadores conectados y tu quieres que se muestren 20, pues añades en las properties la cantidad de jugadores falsos que estan conectados. No es muy recomendable, por el engaño que genera.. pero la gente pide siempre este code.