Jump to content

Recommended Posts

  • 5 months later...
Posted (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 by dimityr203
Posted (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 by melron
  • 3 months later...
Posted

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.)

  • Vision locked this topic
Guest
This topic is now closed to further replies.


  • Posts

    • What does ‘half-finished’ even mean? Most projects based on L2Off use essentially the same files made for gold-style servers, and they’re fully functional. As for the L2J branches, calling them ‘half-finished’ couldn’t be further from the truth, they’re not only complete in the sense of gold-style projects but are actually extended with even more features.
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchiha-market.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/4EPpYhe2HA  | https://campsite.bio/utchihaamkt  
    • sell adena l2rebon signature x1 - 1kk = 1 dollars l2reborn x10 - 500kk = 4.7 dollars E-Global x Lu4 - 1kk = 2.7 dollars BOHPTS - x20-x500 TOP PRICE DISCORD - GODDARDSHOP TELEGRAM - MMOPROMO Also on sale are Epic jewelry, Clothes at a very good price
    • For wholesale clients   We understand that favorable terms are especially important when dealing with large volumes. That’s why we offer a flexible system for wholesale clients  we can discuss pricing and provide personalized solutions tailored to your needs. With us, you get not only a reliable service but also support focused on long-term cooperation. We value partners who operate at scale and do everything possible to make it convenient and profitable for you to grow together with Vibe SMS.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms   Quality in the Details     As Henry Ford said: "Quality means doing it right even when no one is looking."   At Vibe SMS, we believe the same. Every number and every feature is designed to make your work easy and stress-free. With us, it’s simple: grab a number, complete your task, and move forward. Reliability, comfort, and attention to detail — that’s our vibe, helping you focus on what really matters.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms  
    • We ready to post first part of Patchnotes! To avoid delaying the patch notes, we’ve decided to split them into two parts. Right now, we’re publishing the patch notes focused on balance changes (skill changes). In the second part, we’ll share details about gameplay updates, world changes, activities, and more.  - Patchnotes (last post on topic) https://forum.lineage2dex.com/threads/16724/#post-72291
  • 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