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

    • I sell complete packs. If you want to add an item, NPC, etc., you have to do that yourselves. Your friend bought the pack; he's the one who needs to configure his server type. He received what he bought as agreed, and I'm saying this without knowing who you're talking about, because anyone who buys something receives what was agreed upon.   Regards. mmmmm L2Velmore ????   If that's the one, I see everything went well... if I remember correctly you were crying over $100, I gave you a better price, and I suppose you made thousands with that... And you're still coming back to complain? :=)
    • I know many people have struggled with this specific issue and had trouble setting up the correct behavior for Toggle skills in aCis. By default, toggles interrupt the player's movement (retail-like), which often feels clunky to players who prefer a smoother, more modern experience. I've prepared a clean solution that eliminates this "freeze" and allows for fluid movement while toggling your auras. Below is the code on how to achieve this. Hope it helps! Changes in PlayerAI.java: Modified doActiveIntention to properly update the active state without stalling. Removed the forced stop() during toggle casting. Added a MoveToLocation broadcast to ensure other players see your movement correctly (prevents visual "teleporting" or desync). Best regards 😃 diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java index ba0425a..1b2658d 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java @@ -28,6 +28,7 @@  import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;  import net.sf.l2j.gameserver.network.serverpackets.AutoAttackStart;  import net.sf.l2j.gameserver.network.serverpackets.ChairSit; +import net.sf.l2j.gameserver.network.serverpackets.MoveToLocation;  import net.sf.l2j.gameserver.network.serverpackets.MoveToLocationInVehicle;  import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn;  import net.sf.l2j.gameserver.network.serverpackets.StopMove; @@ -159,7 +160,10 @@      @Override      public synchronized void doActiveIntention()      { -        doIdleIntention(); +        prepareIntention(); +        _currentIntention.updateAsActive(); +        if (!getActor().isMoving()) +            thinkIdle();      }            @Override @@ -280,8 +284,9 @@                    if (skill.isToggle())          { -            getActor().getMove().stop();              getActor().getCast().doToggleCast(skill, target); +            if (getActor().isMoving()) +                getActor().broadcastPacket(new MoveToLocation(getActor()));          }          else          { https://pastebin.com/twZujZ3Y
    • The pot calling the kettle black.  '' GX-EXT'' He did some work for a friend and hasn’t finished it to this day—so, the pot calling the kettle black. I find it funny.   '' GX-EXT' IS TRASH PERSONA      
    • Looks that many source is gonna leak?
    • Trevor from gta will wake up! Great share  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..