Jump to content

Recommended Posts

Posted (edited)

Hello here is a gode for this http://postimg.org/image/gk2nw63l3/

#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java	(revision 986)
+++ head-src/com/l2jfrozen/Config.java	(working copy)
@@ -2891,6 +2891,8 @@
 	public static int GM_OVER_ENCHANT;
 	public static int MAX_ITEM_ENCHANT_KICK;
 
+	public static boolean ENABLE_ENCHANT_ANNOUNCE;
+	public static int ENCHANT_ANNOUNCE_LEVEL;
 
 	//============================================================
 	public static void loadEnchantConfig()
@@ -3196,6 +3198,8 @@
 			MAX_ITEM_ENCHANT_KICK = Integer.parseInt(ENCHANTSetting.getProperty("EnchantKick", "0"));
 			GM_OVER_ENCHANT = Integer.parseInt(ENCHANTSetting.getProperty("GMOverEnchant", "0"));
 
+			ENABLE_ENCHANT_ANNOUNCE = Boolean.parseBoolean(ENCHANTSetting.getProperty("EnableEnchantAnnounce", "False"));
+			ENCHANT_ANNOUNCE_LEVEL = Integer.parseInt(ENCHANTSetting.getProperty("EnchantAnnounceLevel", "16"));
 		}
 		catch(Exception e)
 		{
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java	(revision 986)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java	(working copy)
@@ -25,6 +25,7 @@
 import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
 import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jfrozen.gameserver.model.base.Race;
+import com.l2jfrozen.gameserver.model.entity.Announcements;
 import com.l2jfrozen.gameserver.network.SystemMessageId;
 import com.l2jfrozen.gameserver.network.serverpackets.EnchantResult;
 import com.l2jfrozen.gameserver.network.serverpackets.InventoryUpdate;
@@ -301,6 +302,7 @@
 		int chance = 0;
 		int maxEnchantLevel = 0;
 		int minEnchantLevel = 0;
+		int nextEnchantLevel = item.getEnchantLevel() + 1;
 
 		if(item.getItem().getType2() == L2Item.TYPE2_WEAPON)
 		{
@@ -565,6 +567,9 @@
 					sm = new SystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED);
 					sm.addItemName(item.getItemId());
 					activeChar.sendPacket(sm);
+
+					if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL == 0)
+						Announcements.getInstance().gameAnnounceToAll("Congratulations to " + activeChar.getName() + "! Your " + item.getItem() + " has been successfully enchanted to +" + nextEnchantLevel);
 				}
 				else
 				{
@@ -572,6 +577,9 @@
 					sm.addNumber(item.getEnchantLevel());
 					sm.addItemName(item.getItemId());
 					activeChar.sendPacket(sm);
+
+					if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL <= item.getEnchantLevel())
+						Announcements.getInstance().gameAnnounceToAll("Congratulations to " + activeChar.getName() + "! Your " + item.getItem() + " has been successfully enchanted to +" + nextEnchantLevel);
 				}
 
 				item.setEnchantLevel(item.getEnchantLevel() + Config.CUSTOM_ENCHANT_VALUE);
Index: config/head/enchant.properties
===================================================================
--- config/head/enchant.properties	(revision 986)
+++ config/head/enchant.properties	(working copy)
@@ -131,4 +131,14 @@
 # HOW WORKS: if you set it to 20, and player have an item > 20 
 # he will be kicked and the item will disappear!
 # Enchant amount at which a player gets punished (0 disabled)
-EnchantKick = 0
\ No newline at end of file
+EnchantKick = 0
+
+# ----------------------
+# 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 = 16

credits: RedHot

Edited by ThelwHelpRePaidia
Posted (edited)

Would be better to announce it only after +6 enchant.

 

 

Edit: Saw now you can configure it. :-[

Edited by Gries
  • 3 months later...
  • 6 months later...
  • 1 month later...
  • 2 months later...
  • 11 months later...
Posted

Hello here is a gode for this http://postimg.org/image/gk2nw63l3/

#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/Config.java
===================================================================
--- head-src/com/l2jfrozen/Config.java	(revision 986)
+++ head-src/com/l2jfrozen/Config.java	(working copy)
@@ -2891,6 +2891,8 @@
 	public static int GM_OVER_ENCHANT;
 	public static int MAX_ITEM_ENCHANT_KICK;
 
+	public static boolean ENABLE_ENCHANT_ANNOUNCE;
+	public static int ENCHANT_ANNOUNCE_LEVEL;
 
 	//============================================================
 	public static void loadEnchantConfig()
@@ -3196,6 +3198,8 @@
 			MAX_ITEM_ENCHANT_KICK = Integer.parseInt(ENCHANTSetting.getProperty("EnchantKick", "0"));
 			GM_OVER_ENCHANT = Integer.parseInt(ENCHANTSetting.getProperty("GMOverEnchant", "0"));
 
+			ENABLE_ENCHANT_ANNOUNCE = Boolean.parseBoolean(ENCHANTSetting.getProperty("EnableEnchantAnnounce", "False"));
+			ENCHANT_ANNOUNCE_LEVEL = Integer.parseInt(ENCHANTSetting.getProperty("EnchantAnnounceLevel", "16"));
 		}
 		catch(Exception e)
 		{
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java	(revision 986)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java	(working copy)
@@ -25,6 +25,7 @@
 import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
 import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jfrozen.gameserver.model.base.Race;
+import com.l2jfrozen.gameserver.model.entity.Announcements;
 import com.l2jfrozen.gameserver.network.SystemMessageId;
 import com.l2jfrozen.gameserver.network.serverpackets.EnchantResult;
 import com.l2jfrozen.gameserver.network.serverpackets.InventoryUpdate;
@@ -301,6 +302,7 @@
 		int chance = 0;
 		int maxEnchantLevel = 0;
 		int minEnchantLevel = 0;
+		int nextEnchantLevel = item.getEnchantLevel() + 1;
 
 		if(item.getItem().getType2() == L2Item.TYPE2_WEAPON)
 		{
@@ -565,6 +567,9 @@
 					sm = new SystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED);
 					sm.addItemName(item.getItemId());
 					activeChar.sendPacket(sm);
+
+					if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL == 0)
+						Announcements.getInstance().gameAnnounceToAll("Congratulations to " + activeChar.getName() + "! Your " + item.getItem() + " has been successfully enchanted to +" + nextEnchantLevel);
 				}
 				else
 				{
@@ -572,6 +577,9 @@
 					sm.addNumber(item.getEnchantLevel());
 					sm.addItemName(item.getItemId());
 					activeChar.sendPacket(sm);
+
+					if(Config.ENABLE_ENCHANT_ANNOUNCE && Config.ENCHANT_ANNOUNCE_LEVEL <= item.getEnchantLevel())
+						Announcements.getInstance().gameAnnounceToAll("Congratulations to " + activeChar.getName() + "! Your " + item.getItem() + " has been successfully enchanted to +" + nextEnchantLevel);
 				}
 
 				item.setEnchantLevel(item.getEnchantLevel() + Config.CUSTOM_ENCHANT_VALUE);
Index: config/head/enchant.properties
===================================================================
--- config/head/enchant.properties	(revision 986)
+++ config/head/enchant.properties	(working copy)
@@ -131,4 +131,14 @@
 # HOW WORKS: if you set it to 20, and player have an item > 20 
 # he will be kicked and the item will disappear!
 # Enchant amount at which a player gets punished (0 disabled)
-EnchantKick = 0
\ No newline at end of file
+EnchantKick = 0
+
+# ----------------------
+# 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 = 16

credits: RedHot

Hello. I'm added your code, but for me doesn't work it. Everything added correct, but no effect. In console no errors. I'm adding on weapon from +15 to +16, but in chat nothing.

 

Regards,

Enduzo

Posted

Hello. I'm added your code, but for me doesn't work it. Everything added correct, but no effect. In console no errors. I'm adding on weapon from +15 to +16, but in chat nothing.

 

Regards,

Enduzo

Did you add the configs the right way? Maybe u forgot to set them True?

Guest
This topic is now closed to further replies.


  • Posts

    • NFT gifts on Telegram are already here! Buy Stars at SOCNET — the black background can be yours today! Purchase existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium, and react to messages in channels! Low prices, many payment methods, and other cool and unique features! Try it today — SOCNET STARS BOT Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and beneficial purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial: just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • NFT gifts on Telegram are already here! Buy Stars at SOCNET — the black background can be yours today! Purchase existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium, and react to messages in channels! Low prices, many payment methods, and other cool and unique features! Try it today — SOCNET STARS BOT Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and beneficial purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial: just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • NFT gifts on Telegram are already here! Buy Stars at SOCNET — the black background can be yours today! Purchase existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium, and react to messages in channels! Low prices, many payment methods, and other cool and unique features! Try it today — SOCNET STARS BOT Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and beneficial purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website in the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial: just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Wts adena 1kk = 10$  discord - GODDARDSHOP 
    • Thanks for the feedback! We’ve actually rented their infrastructure to ensure a high-quality gaming experience (We couldn't find any better files out there). Developer @FixerRay will also be there to assist us 🙂
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock