Jump to content

Announce Enchant Success


Recommended Posts

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
Link to comment
Share on other sites

This code was created by me!

 

mtdqY.png

 

http://pastebin.com/SkRSXU4g

 


 

There is another code with an new version and announce only on same region  ;)

 

HKu0Q3t.jpg

 

http://pastebin.com/rUATUF3m

Edited by RedHoT
Link to comment
Share on other sites

okay then added credits

 

 

Edit: It would be better if you add with what scroll he did the enchant:P

Edited by ThelwHelpRePaidia
Link to comment
Share on other sites

  • 3 months later...

Hello, why dont work in my pack? i use jfrozen rev 1118. I dont have any error when i compile and when start the sv dont have error too. So, i enchant put dont put any message :( i use this code http://pastebin.com/SkRSXU4g

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 2 months later...
  • 11 months later...

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Why not making hi5 files to support login/play at the client and only make some client parts for the rest? Isnt it more easy?
    • Powerful Spells Caster & Spiritual Healer Web: lovespellsafrika.com Phone: +27780802727 WhatsApp +27789121499 Email: bbaantu@gmail.com Real Magic Spells | How To Get Back Ex-Boyfriend or Ex-Girlfriend. Real Magic Spells for all purpose; Now you can benefit through the use of spells like Love Spells, Money Spells, Talismans, Charms, Prayers, Curses and Chants. Magic Spells can be spell cast for many purposes. Talismans and Charms work as powerful Ingredients. If you need any spiritual knowledge on the power of Spells and Magic you can always Powerful Magic Rings Love Spells                     Casting of Simple and Effective Love Spells Easy Love Spells Spells for Attraction between two Lovers Binding Love Spells Get back Lost Lover Spells Spells to Strengthen Love Relation Lost Love Spells Soul Mate Spells Marriage Spell for a happy Married Life. Retrieve a Lost Love Spells Bring Back Your Love Spells Gay Love Spells, Lesbian Love Spells Anti-Love Spells, Divorce Spells, Break up Spells How to Get Back Ex-Boyfriend, or Ex-Girlfriend Casting Spells to Get Rid of Your Husband, Wife or Partner without Fights or them hating you Magic Rings, Powerful Love Rings Spells to stop a divorce Voodoo Spells for Love Love Return Spells Money & Prosperity Spells Phone: +27780802727 WhatsApp +27789121499 How to Cast Magic Money Spells Lottery Spells or Lotto Spells Voodoo Spells for Money Black Magic Spell for Money Protection & Banishing Spells Black Magic Spells and Curses to Destroy Enemy or Evil People Protection from Black Magic Spells and Curses Dark Magic Spells Voodoo Spells for Revenge Spells to win court cases &legal matters Healing spells for all purpose Stroke Diabetics Lottery Spells Phone: +27780802727 WhatsApp: +27789121499 Web: lovespellsafrika.com
    • Powerful Spells Caster & Spiritual Healer Web: lovespellsafrika.com Phone: +27780802727 WhatsApp +27789121499 Email: bbaantu@gmail.com Real Magic Spells | How To Get Back Ex-Boyfriend or Ex-Girlfriend. Real Magic Spells for all purpose; Now you can benefit through the use of spells like Love Spells, Money Spells, Talismans, Charms, Prayers, Curses and Chants. Magic Spells can be spell cast for many purposes. Talismans and Charms work as powerful Ingredients. If you need any spiritual knowledge on the power of Spells and Magic you can always Powerful Magic Rings Love Spells                     Casting of Simple and Effective Love Spells Easy Love Spells Spells for Attraction between two Lovers Binding Love Spells Get back Lost Lover Spells Spells to Strengthen Love Relation Lost Love Spells Soul Mate Spells Marriage Spell for a happy Married Life. Retrieve a Lost Love Spells Bring Back Your Love Spells Gay Love Spells, Lesbian Love Spells Anti-Love Spells, Divorce Spells, Break up Spells How to Get Back Ex-Boyfriend, or Ex-Girlfriend Casting Spells to Get Rid of Your Husband, Wife or Partner without Fights or them hating you Magic Rings, Powerful Love Rings Spells to stop a divorce Voodoo Spells for Love Love Return Spells Money & Prosperity Spells Phone: +27780802727 WhatsApp +27789121499 How to Cast Magic Money Spells Lottery Spells or Lotto Spells Voodoo Spells for Money Black Magic Spell for Money Protection & Banishing Spells Black Magic Spells and Curses to Destroy Enemy or Evil People Protection from Black Magic Spells and Curses Dark Magic Spells Voodoo Spells for Revenge Spells to win court cases &legal matters Healing spells for all purpose Stroke Diabetics Lottery Spells Phone: +27780802727 WhatsApp: +27789121499 Web: lovespellsafrika.com
    • GOLD BARS MINERS AND EXPORTERS Call +27785383038 Email golddnuggets@gmail.com We are miners and exporters of gold bars, Nuggets, dust and rough diamonds looking for serious buyers for long term business Buy Gold Nuggets in Uganda and gold bars from us because we are the leading sellers of the following mineral Gold bars and Gold Nuggets in Uganda 98.9% purity 24 carats of Congo origin (DRC), Uganda, South Africa & Southern Sudan, Central Africa (Gold Nuggets in Uganda) on good price. Call +27785383038 We can supply Gold up to 600 kilograms or even More at a generally low price to meet the buyers resell value for his money, We Can Supply both Whole sale and Retail, the Buyer is free to come down for inspection and viewing of the goods at our headquarters in Kampala, Uganda. We sell and deliver all over the World. We have in stock four (4) Standard categories of Gold ” 24 Carat – 98.9% Gold ” 18 Carat – 75% Gold ” 18 Carat – 58.3% Gold ” 12 Carat – 50% Gold Firstly, it’s worthwhile to note that gold (Au) in itself is a commodity that’s been highly coveted ever since the World knew of beauty and economics – as far back as biblical times. Pure Gold Nuggets in Uganda from DRC Congo and Uganda The DRC Congo is an impoverished country with a long history of civil conflicts. The country itself is highly endowed with natural resources. Buy Gold Nuggets in Uganda and bars from us and you see your business grow. Are you looking for Gold in Africa, Agents of Gold in Africa, Congo gold, Gold Nuggets in Uganda, gold bars, gold dust, gold dealers, gold sellers, and gold quality? Then Ngamba Mining (Pty) Ltd is the right place. We sell and deliver Gold everywhere in the world. Gold Nuggets in Uganda, Bars, Diamond on Sale in Africa A gold nugget is a naturally occurring piece of native gold. Watercourses often concentrate nuggets and finer gold in placers. Nuggets are recovered by placer mining, but they are also found in residual deposits where the gold-bearing veins or lodes are weathered. Nuggets are also found in the tailings piles of previous mining operations, especially those left by gold mining dredges.   Nuggets are usually 20.5K to 22K purity (83% to 92%)   Gold bars, gold dust and Gold Nuggets in Uganda are the various maximum coveted treasured metals within the global. Jewellery crafted out of these pure substances is often incredibly valued and sought out by using savvy consumers across the world. Learn the whole lot you want to know about deciding on first-class pieces right now here! By contacting Ngambo Mining (Pty) Ltd Call :+27785383038 Email: golddnuggets@gmail.com
  • Topics

×
×
  • Create New...