Hello here is for Acis.
Index: config/players.properties
===================================================================
--- config/players.properties (revision 6)
+++ config/players.properties (working copy)
@@ -294,4 +288,55 @@
MaxBuffsAmount = 20
# Store buffs/debuffs on user logout?
-StoreSkillCooltime = True
\ No newline at end of file
+StoreSkillCooltime = True
+
+# ----------------------
+# Enchant Announce -
+# ----------------------
+# Announce when a player successfully enchant an item to x
+# Default: False
+EnableEnchantAnnounce = False
+# The value of x is... set it here (No have default value)
+EnchantAnnounceLevel = 6
\ No newline at end of file
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 6)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -495,6 +492,25 @@
public static boolean STORE_SKILL_COOLTIME;
public static int BUFFS_MAX_AMOUNT;
+ public static boolean ENABLE_ENCHANT_ANNOUNCE;
+ public static int ENCHANT_ANNOUNCE_LEVEL;
+
// --------------------------------------------------
// Server
// --------------------------------------------------
@@ -1204,6 +1228,48 @@
BUFFS_MAX_AMOUNT = players.getProperty("MaxBuffsAmount", 20);
STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);
+
+ ENABLE_ENCHANT_ANNOUNCE = players.getProperty("EnableEnchantAnnounce", false);
+ ENCHANT_ANNOUNCE_LEVEL = players.getProperty("EnchantAnnounceLevel", 16);
}
/**
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 6)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (working copy)
@@ -34,6 +34,7 @@
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
+import net.sf.l2j.gameserver.util.Broadcast;
import net.sf.l2j.gameserver.util.Util;
public final class RequestEnchantItem extends AbstractEnchantPacket
@@ -129,11 +130,15 @@
// announce the success
SystemMessage sm;
+ int nextEnchantLevel = item.getEnchantLevel() + 1;
+
if (item.getEnchantLevel() == 0)
{
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED);
sm.addItemName(item.getItemId());
activeChar.sendPacket(sm);
+ if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL == 0)
+ Broadcast.announceToOnlinePlayers("Congratulations to " + activeChar.getName() + "! Your " + item.getItemName() + " has been successfully enchanted to +" + nextEnchantLevel);
}
else
{
@@ -141,6 +146,8 @@
sm.addNumber(item.getEnchantLevel());
sm.addItemName(item.getItemId());
activeChar.sendPacket(sm);
+ if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL <= item.getEnchantLevel())
+ Broadcast.announceToOnlinePlayers("Congratulations to " + activeChar.getName() + "! Your " + item.getItemName() + " has been successfully enchanted to +" + nextEnchantLevel);
}
item.setEnchantLevel(item.getEnchantLevel() + 1);