Advertisement
warc222

fakeplayer l2jfrozen no test

Nov 24th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.36 KB | None | 0 0
  1. ### Eclipse Workspace patch 1.0
  2. #P L2jFrozen_gameserver
  3. Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java     (revision 1068)
  6. +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java     (working copy)
  7. @@ -565,7 +565,18 @@
  8.                         sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("Welcome to " + Config.ALT_Server_Name));
  9.  
  10.                 if (Config.ONLINE_PLAYERS_ON_LOGIN)
  11. -                       sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + L2World.getInstance().getAllPlayers().size() + " players online."));
  12. +               {
  13. +                       if(Config.ADDFAKEPLAYERSMODE)
  14. +                       {
  15. +                               int playerSizeOnline = L2World.getInstance().getAllPlayers().size() + Config.ADDFAKEPLAYERSNUMBER;
  16. +                               sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + playerSizeOnline + " players online."));
  17. +                       }
  18. +                                                      
  19. +                       else
  20. +                       {
  21. +                               sendPacket(new SystemMessage(SystemMessageId.S1_S2).addString("There are " + L2World.getInstance().getAllPlayers().size() + " players online."));
  22. +                       }
  23. +               }
  24.  
  25.                 if (activeChar.getFirstLog() && Config.NEW_PLAYER_EFFECT)
  26.                 {
  27. Index: config/functions/l2jfrozen.properties
  28. ===================================================================
  29. --- config/functions/l2jfrozen.properties       (revision 1068)
  30. +++ config/functions/l2jfrozen.properties       (working copy)
  31. @@ -280,4 +280,9 @@
  32.  ProtectorSkillLevel = 13
  33.  ProtectorSkillTime = 600
  34.  # Npc Protector Message
  35. -ProtectorMessage = Hey You!, Never Kill On this area, Go Read The Rules!
  36.  No newline at end of file
  37. +ProtectorMessage = Hey You!, Never Kill On this area, Go Read The Rules!
  38. +
  39. +# this mode is if you want to increase,
  40. +# the count number of the players, who are online.
  41. +FakePlayersSystem = false
  42. +NumberPlussForFakePlayers = 0;
  43. Index: head-src/com/l2jfrozen/Config.java
  44. ===================================================================
  45. --- head-src/com/l2jfrozen/Config.java  (revision 1068)
  46. +++ head-src/com/l2jfrozen/Config.java  (working copy)
  47. @@ -2398,6 +2398,9 @@
  48.         public static string FARM2_CUSTOM_MESSAGE;
  49.         public static string PVP1_CUSTOM_MESSAGE;
  50.         public static string PVP2_CUSTOM_MESSAGE;
  51. +      
  52. +       public static boolean ADDFAKEPLAYERSMODE;
  53. +       public static int ADDFAKEPLAYERSNUMBER;
  54.  
  55.         //============================================================
  56.         public static void loadL2JFrozenConfig()
  57. @@ -2517,6 +2520,9 @@
  58.                         FARM2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("Farm2CustomMeesage", "You have been teleported to Farm Zone 2!");
  59.                         PVP1_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP1CustomMeesage", "You have been teleported to PvP Zone 1!");
  60.                         PVP2_CUSTOM_MESSAGE = L2JFrozenSettings.getProperty("PvP2CustomMeesage", "You have been teleported to PvP Zone 2!");
  61. +                      
  62. +                       ADDFAKEPLAYERSMODE  = boolean.parseBoolean(L2JFrozenSettings.getProperty("FakePlayersSystem", "False"));
  63. +                       ADDFAKEPLAYERSNUMBER = integer.parseInt(L2JFrozenSettings.getProperty("NumberPlussForFakePlayers", "0"));
  64.                 }
  65.                 catch(exception e)
  66.                 {
  67. Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Online.java
  68. ===================================================================
  69. --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Online.java (revision 1068)
  70. +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Online.java (working copy)
  71. @@ -14,6 +14,7 @@
  72.   */
  73.  package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
  74.  
  75. +import com.l2jfrozen.Config;
  76.  import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
  77.  import com.l2jfrozen.gameserver.model.L2World;
  78.  import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  79. @@ -30,9 +31,16 @@
  80.         {
  81.                 if(command.equalsIgnoreCase("online"))
  82.                 {
  83. -                       activeChar.sendMessage("======<Players Online!>======");
  84. -                       activeChar.sendMessage("There are " + L2World.getInstance().getAllPlayers().size() + " players online!.");
  85. -                       activeChar.sendMessage("=======================");
  86. +                       if(Config.ADDFAKEPLAYERSMODE)
  87. +                       {
  88. +                               int playerSizeOnline = L2World.getInstance().getAllPlayers().size() + Config.ADDFAKEPLAYERSNUMBER;
  89. +                               activeChar.sendMessage("There are " + playerSizeOnline + " players online!");
  90. +                       }
  91. +                                              
  92. +                       else
  93. +                       {
  94. +                               activeChar.sendMessage("There are " + L2World.getInstance().getAllPlayers().size() + " players online!");
  95. +                       }
  96.                 }
  97.                 return true;
  98.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement