MarGaZeaS 56 Posted May 31, 2017 Posted May 31, 2017 any have for acis? Quote Share this post Link to post Share on other sites
dimityr203 0 Posted November 19, 2017 Posted November 19, 2017 (edited) 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); Edited November 19, 2017 by dimityr203 Quote Share this post Link to post Share on other sites
melron 202 Posted November 19, 2017 Posted November 19, 2017 (edited) 1 hour ago, dimityr203 said: Hello here is for Acis. 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); The code in RequestEnchantItem can be replaced with: (Both codes will work) ### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 239) +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (working copy) @@ -127,6 +127,9 @@ } item.setEnchantLevel(item.getEnchantLevel() + 1); + + if(Config.ENABLE_ENCHANT_ANNOUNCE && (Config.ENCHANT_ANNOUNCE_LEVEL == 0 || Config.ENCHANT_ANNOUNCE_LEVEL <= item.getEnchantLevel())) + Broadcast.announceToOnlinePlayers("Congratulations to " + activeChar.getName() + "! Your " + item.getItemName() + " has been successfully enchanted to +" + item.getEnchantLevel()); + item.updateDatabase(); // If item is equipped, verify the skill obtention (+4 duals, +6 armorset). Edited November 19, 2017 by melron Quote Share this post Link to post Share on other sites
k4yN 0 Posted February 23, 2018 Posted February 23, 2018 Well... i'm new and looking things to play with my server and i wanted to comment only because i found this actualy wrong, as i found wrong all the things that destroy l2 uniqueness, you should not know what other do/wear/combo strategy they build because everyone is unique, if you inform what someone have you avoid to fight him, or just even a n00b c/p him. Gr8 work but no the things i use to add for what I've said above. (old post but just a motivation on people do those codes can make many difirent things instead of that, peace.) Quote Share this post Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.