Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- index 58fb660..07a50ad 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java
- @@ -8,6 +8,8 @@
- import java.util.Date;
- import java.util.Map.Entry;
- +import net.sf.l2j.commons.concurrent.ThreadPool;
- +
- import net.sf.l2j.Config;
- import net.sf.l2j.L2DatabaseFactory;
- import net.sf.l2j.gameserver.communitybbs.Manager.MailBBSManager;
- @@ -466,12 +465,28 @@
- if (player.getActiveClass() == player.getBaseClass() && player.isHero() && !Config.ANNOUNCE_HERO_ENTER_BY_CLAN_MEMBER_MSG.isEmpty())
- World.announceToOnlinePlayers(player.getClan() != null ? Config.ANNOUNCE_HERO_ENTER_BY_CLAN_MEMBER_MSG.replace("%player%", player.getName()).replace("%clan%", player.getClan().getName()).replace("%classe%", player.setClassName(player.getBaseClass())) : Config.ANNOUNCE_HERO_ENTER_BY_PLAYER_MSG.replace("%player%", player.getName()).replace("%classe%", player.setClassName(player.getBaseClass())), true);
- ClassMaster.showQuestionMark(player);
- + if (Config.ANNOUNCE_ONLINE_PLAYERS_DELAY > 0)
- + ThreadPool.schedule(() -> announceRecord(player), Config.ANNOUNCE_ONLINE_PLAYERS_DELAY * 1000 * 60);
- +
- player.sendPacket(ActionFailed.STATIC_PACKET);
- }
- + public void announceRecord(Player player)
- + {
- + int NumberofPlayers = World.getInstance().getPlayers().size();
- +
- + if (NumberofPlayers == 1)
- + player.sendMessage("Record " + NumberofPlayers + " player is online.");
- + else
- + player.sendMessage("Record " + NumberofPlayers + " player are online.");
- + }
- +
- @Override
- protected boolean triggersOnActionRequest()
- {
- diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
- index 30a8fe8..a2ab434 100644
- --- a/aCis_gameserver/java/net/sf/l2j/Config.java
- +++ b/aCis_gameserver/java/net/sf/l2j/Config.java
- @@ -407,6 +443,7 @@
- public static boolean DEEPBLUE_DROP_RULES;
- public static boolean ALT_GAME_DELEVEL;
- public static int DEATH_PENALTY_CHANCE;
- + public static int ANNOUNCE_ONLINE_PLAYERS_DELAY;
- public static int CANCEL_SECONDS;
- public static int RAIDBOSS_NOBLES;
- public static boolean ENABLE_SPREEKILLS;
- @@ -1167,6 +1261,7 @@
- DEEPBLUE_DROP_RULES = players.getProperty("UseDeepBlueDropRules", true);
- ALT_GAME_DELEVEL = players.getProperty("Delevel", true);
- DEATH_PENALTY_CHANCE = players.getProperty("DeathPenaltyChance", 20);
- + ANNOUNCE_ONLINE_PLAYERS_DELAY = players.getProperty("AnnounceOnlinePlayersDelay", 60);
- CANCEL_SECONDS = players.getProperty("CancelSeconds", 5);
- RAIDBOSS_NOBLES = players.getProperty("RaidBossId", 0);
- ENABLE_SPREEKILLS = players.getProperty("EnableSpreeKills", false);
- diff --git a/aCis_gameserver/config/players.properties b/aCis_gameserver/config/players.properties
- index 2df0cd8..2e7d2ed 100644
- --- a/aCis_gameserver/config/players.properties
- +++ b/aCis_gameserver/config/players.properties
- @@ -42,6 +42,10 @@
- # Death Penalty chance if killed by mob (in %), 20 by default
- DeathPenaltyChance = 20
- +#Announcer all player online
- +# Default : 5 minutes
- +AnnounceOnlinePlayersDelay = 5
- +
- # This setting back the buffs after the set time in Cancel in Seconds
- CancelSeconds = 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement