Jump to content

Recommended Posts

Posted

Can anyone help me? i cant find the line  <<for (int scrollId : CRYSTAL_SCROLLS)>>

 

in java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java

 

I have gracia final l2j how can i find it?

 

 

seach for :

 

if (Rnd.get(100) < chance)

        {

            synchronized(item)

 

and paste the  code above it...

Posted

Can anyone help me? i cant find the line  <<for (int scrollId : CRYSTAL_SCROLLS)>>

 

in java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java

 

I have gracia final l2j how can i find it?

 

 

i think L2j make another code so the above can't apply it but in

com.l2jserver.gameserver.network.clientpackets;

you can edit any scroll you want

// itemId, (isWeapon, isBlessed, isCrystal, isSafe, grade, max enchant level, chance increase, allowed item IDs)

// allowed items list must be sorted by ascending order

_scrolls.put(729, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 0, null));

_scrolls.put(730, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 0, null));

_scrolls.put(731, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_A, 0, 0, null));

_scrolls.put(732, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_A, 0, 0, null));

_scrolls.put(947, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 0, null));

_scrolls.put(948, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 0, null));

_scrolls.put(949, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_B, 0, 0, null));

_scrolls.put(950, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_B, 0, 0, null));

_scrolls.put(951, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_C, 0, 0, null));

_scrolls.put(952, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_C, 0, 0, null));

_scrolls.put(953, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_C, 0, 0, null));

_scrolls.put(954, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_C, 0, 0, null));

_scrolls.put(955, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_D, 0, 0, null));

_scrolls.put(956, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_D, 0, 0, null));

_scrolls.put(957, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_D, 0, 0, null));

_scrolls.put(958, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_D, 0, 0, null));

_scrolls.put(959, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_S, 0, 0, null));

_scrolls.put(960, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_S, 0, 0, null));

_scrolls.put(961, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_S, 0, 0, null));

_scrolls.put(962, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_S, 0, 0, null));

_scrolls.put(6569, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_A, 0, 0, null));

_scrolls.put(6570, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_A, 0, 0, null));

_scrolls.put(6571, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_B, 0, 0, null));

_scrolls.put(6572, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_B, 0, 0, null));

_scrolls.put(6573, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_C, 0, 0, null));

_scrolls.put(6574, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_C, 0, 0, null));

_scrolls.put(6575, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_D, 0, 0, null));

_scrolls.put(6576, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_D, 0, 0, null));

_scrolls.put(6577, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_S, 0, 0, null));

_scrolls.put(6578, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_S, 0, 0, null));

_scrolls.put(22006, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_D, 0, 10, null));

_scrolls.put(22007, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_C, 0, 10, null));

_scrolls.put(22008, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 10, null));

_scrolls.put(22009, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 10, null));

_scrolls.put(22010, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_D, 0, 10, null));

_scrolls.put(22011, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_C, 0, 10, null));

_scrolls.put(22012, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 10, null));

_scrolls.put(22013, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 10, null));

_scrolls.put(22014, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, 16, 10, null));

_scrolls.put(22015, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, 16, 10, null));

_scrolls.put(22016, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, 16, 10, null));

_scrolls.put(22017, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, 16, 10, null));

_scrolls.put(22018, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 100, null));

_scrolls.put(22019, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 100, null));

_scrolls.put(22020, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 100, null));

_scrolls.put(22021, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 100, null));

 

// Master Yogi's Scroll Enchant Weapon (event)

_scrolls.put(13540, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_NONE, 0, 0, new int[]{ 13539 }));

 

// itemId, (isWeapon, grade, max enchant level, chance increase)

_supports.put(12362, new EnchantItem(true, L2Item.CRYSTAL_D, 9, 20, null));

_supports.put(12363, new EnchantItem(true, L2Item.CRYSTAL_C, 9, 18, null));

_supports.put(12364, new EnchantItem(true, L2Item.CRYSTAL_B, 9, 15, null));

_supports.put(12365, new EnchantItem(true, L2Item.CRYSTAL_A, 9, 12, null));

_supports.put(12366, new EnchantItem(true, L2Item.CRYSTAL_S, 9, 10, null));

_supports.put(12367, new EnchantItem(false, L2Item.CRYSTAL_D, 9, 35, null));

_supports.put(12368, new EnchantItem(false, L2Item.CRYSTAL_C, 9, 27, null));

_supports.put(12369, new EnchantItem(false, L2Item.CRYSTAL_B, 9, 23, null));

_supports.put(12370, new EnchantItem(false, L2Item.CRYSTAL_A, 9, 18, null));

_supports.put(12371, new EnchantItem(false, L2Item.CRYSTAL_S, 9, 15, null));

_supports.put(14702, new EnchantItem(true, L2Item.CRYSTAL_D, 9, 20, null));

_supports.put(14703, new EnchantItem(true, L2Item.CRYSTAL_C, 9, 18, null));

_supports.put(14704, new EnchantItem(true, L2Item.CRYSTAL_B, 9, 15, null));

_supports.put(14705, new EnchantItem(true, L2Item.CRYSTAL_A, 9, 12, null));

_supports.put(14706, new EnchantItem(true, L2Item.CRYSTAL_S, 9, 10, null));

_supports.put(14707, new EnchantItem(false, L2Item.CRYSTAL_D, 9, 35, null));

_supports.put(14708, new EnchantItem(false, L2Item.CRYSTAL_C, 9, 27, null));

_supports.put(14709, new EnchantItem(false, L2Item.CRYSTAL_B, 9, 23, null));

_supports.put(14710, new EnchantItem(false, L2Item.CRYSTAL_A, 9, 18, null));

_supports.put(14711, new EnchantItem(false, L2Item.CRYSTAL_S, 9, 15, null));

 

Posted

Very useful for servers with donate because you can sell Crystal scrools for real money and the players may trade it in the game for other stuff with other players if they want. Double chance that the player will donate. :D

  • 2 weeks later...
Posted

Wonderful how easily people nowadays abuse karma for fixing 2 strings =]

The share is useless and the way it's coded is bad..

Anyway, thanks for sharing, I guess.

well no useless... bad coded :/ i dont know :P

wtvr...i dont get the thing only some strings...... if the outcome is usefull then why not?

well... ok... if it was really 2 strings it would be stupid but it's not...

  • 5 months later...
  • 1 month later...
  • 1 month later...
Posted

I have a better option:

 

java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java

### Eclipse Workspace Patch 1.0
#P L2J_Server
Index: java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java	(revision 24)
+++ java/com/l2jserver/gameserver/network/clientpackets/AbstractEnchantPacket.java	(working copy)
@@ -55,32 +55,6 @@
			if (enchantItem == null)
				return false;

-			int type2 = enchantItem.getItem().getType2();
-			
-			// checking scroll type and configured maximum enchant level
-			switch (type2)
-			{
-				// weapon scrolls can enchant only weapons
-				case L2Item.TYPE2_WEAPON:
-					if (!_isWeapon
-							|| (Config.ENCHANT_MAX_WEAPON > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_WEAPON))
-						return false;
-					break;
-					// armor scrolls can enchant only accessory and armors
-				case L2Item.TYPE2_SHIELD_ARMOR:
-					if (_isWeapon
-							|| (Config.ENCHANT_MAX_ARMOR > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_ARMOR))
-						return false;
-					break;
-				case L2Item.TYPE2_ACCESSORY:
-					if (_isWeapon
-							|| (Config.ENCHANT_MAX_JEWELRY > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_JEWELRY))
-						return false;
-					break;
-				default:
-					return false;
-			}
-			
			// check for crystal types
			if (_grade != enchantItem.getItem().getItemGradeSPlus())
				return false;
@@ -202,56 +188,56 @@
		// itemId, (isWeapon, isBlessed, isCrystal, isSafe, grade, max enchant level, chance increase, allowed item IDs)
		// allowed items IDs must be sorted by ascending order
		// Scrolls: Enchant Weapon
-		_scrolls.put(729, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 0, null));
-		_scrolls.put(947, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 0, null));
-		_scrolls.put(951, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_C, 0, 0, null));
-		_scrolls.put(955, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_D, 0, 0, null));
-		_scrolls.put(959, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_S, 0, 0, null));
+		_scrolls.put(729, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, maxenchant(), 0, null));
+		_scrolls.put(947, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, maxenchant(), 0, null));
+		_scrolls.put(951, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_C, maxenchant(), 0, null));
+		_scrolls.put(955, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_D, maxenchant(), 0, null));
+		_scrolls.put(959, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_S, maxenchant(), 0, null));
		// Scrolls: Enchant Armor
-		_scrolls.put(730, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 0, null));
-		_scrolls.put(948, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 0, null));
-		_scrolls.put(952, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_C, 0, 0, null));
-		_scrolls.put(956, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_D, 0, 0, null));
-		_scrolls.put(960, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_S, 0, 0, null));
+		_scrolls.put(730, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, maxenchant(), 0, null));
+		_scrolls.put(948, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, maxenchant(), 0, null));
+		_scrolls.put(952, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_C, maxenchant(), 0, null));
+		_scrolls.put(956, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_D, maxenchant(), 0, null));
+		_scrolls.put(960, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_S, maxenchant(), 0, null));

		// Blessed Scrolls: Enchant Weapon
-		_scrolls.put(6569, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_A, 0, 0, null));
-		_scrolls.put(6571, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_B, 0, 0, null));
-		_scrolls.put(6573, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_C, 0, 0, null));
-		_scrolls.put(6575, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_D, 0, 0, null));
-		_scrolls.put(6577, new EnchantScroll(true, true, false, false, L2Item.CRYSTAL_S, 0, 0, null));
+		_scrolls.put(6569, new EnchantScroll(true, true, false, true, L2Item.CRYSTAL_A, blessedmaxenchant(), 0, null));
+		_scrolls.put(6571, new EnchantScroll(true, true, false, true, L2Item.CRYSTAL_B, blessedmaxenchant(), 0, null));
+		_scrolls.put(6573, new EnchantScroll(true, true, false, true, L2Item.CRYSTAL_C, blessedmaxenchant(), 0, null));
+		_scrolls.put(6575, new EnchantScroll(true, true, false, true, L2Item.CRYSTAL_D, blessedmaxenchant(), 0, null));
+		_scrolls.put(6577, new EnchantScroll(true, true, false, true, L2Item.CRYSTAL_S, blessedmaxenchant(), 0, null));
		// Blessed Scrolls: Enchant Armor
-		_scrolls.put(6570, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_A, 0, 0, null));
-		_scrolls.put(6572, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_B, 0, 0, null));
-		_scrolls.put(6574, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_C, 0, 0, null));
-		_scrolls.put(6576, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_D, 0, 0, null));
-		_scrolls.put(6578, new EnchantScroll(false, true, false, false, L2Item.CRYSTAL_S, 0, 0, null));
+		_scrolls.put(6570, new EnchantScroll(false, true, false, true, L2Item.CRYSTAL_A, blessedmaxenchant(), 0, null));
+		_scrolls.put(6572, new EnchantScroll(false, true, false, true, L2Item.CRYSTAL_B, blessedmaxenchant(), 0, null));
+		_scrolls.put(6574, new EnchantScroll(false, true, false, true, L2Item.CRYSTAL_C, blessedmaxenchant(), 0, null));
+		_scrolls.put(6576, new EnchantScroll(false, true, false, true, L2Item.CRYSTAL_D, blessedmaxenchant(), 0, null));
+		_scrolls.put(6578, new EnchantScroll(false, true, false, true, L2Item.CRYSTAL_S, blessedmaxenchant(), 0, null));

		// Crystal Scrolls: Enchant Weapon
-		_scrolls.put(731, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_A, 0, 0, null));
-		_scrolls.put(949, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_B, 0, 0, null));
-		_scrolls.put(953, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_C, 0, 0, null));
-		_scrolls.put(957, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_D, 0, 0, null));
-		_scrolls.put(961, new EnchantScroll(true, false, true, false, L2Item.CRYSTAL_S, 0, 0, null));
+		_scrolls.put(731, new EnchantScroll(true, false, true, true, L2Item.CRYSTAL_A, crystalmaxenchant(), 0, null));
+		_scrolls.put(949, new EnchantScroll(true, false, true, true, L2Item.CRYSTAL_B, crystalmaxenchant(), 0, null));
+		_scrolls.put(953, new EnchantScroll(true, false, true, true, L2Item.CRYSTAL_C, crystalmaxenchant(), 0, null));
+		_scrolls.put(957, new EnchantScroll(true, false, true, true, L2Item.CRYSTAL_D, crystalmaxenchant(), 0, null));
+		_scrolls.put(961, new EnchantScroll(true, false, true, true, L2Item.CRYSTAL_S, crystalmaxenchant(), 0, null));
		// Crystal Scrolls: Enchant Armor
-		_scrolls.put(732, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_A, 0, 0, null));
-		_scrolls.put(950, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_B, 0, 0, null));
-		_scrolls.put(954, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_C, 0, 0, null));
-		_scrolls.put(958, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_D, 0, 0, null));
-		_scrolls.put(962, new EnchantScroll(false, false, true, false, L2Item.CRYSTAL_S, 0, 0, null));
+		_scrolls.put(732, new EnchantScroll(false, false, true, true, L2Item.CRYSTAL_A, crystalmaxenchant(), 0, null));
+		_scrolls.put(950, new EnchantScroll(false, false, true, true, L2Item.CRYSTAL_B, crystalmaxenchant(), 0, null));
+		_scrolls.put(954, new EnchantScroll(false, false, true, true, L2Item.CRYSTAL_C, crystalmaxenchant(), 0, null));
+		_scrolls.put(958, new EnchantScroll(false, false, true, true, L2Item.CRYSTAL_D, crystalmaxenchant(), 0, null));
+		_scrolls.put(962, new EnchantScroll(false, false, true, true, L2Item.CRYSTAL_S, crystalmaxenchant(), 0, null));

		// Weapon Enchant Scrolls
-		_scrolls.put(20517, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_S, 0, 10, null));
-		_scrolls.put(22006, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_D, 0, 10, null));
-		_scrolls.put(22007, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_C, 0, 10, null));
-		_scrolls.put(22008, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_B, 0, 10, null));
-		_scrolls.put(22009, new EnchantScroll(true, false, false, false, L2Item.CRYSTAL_A, 0, 10, null));
+		_scrolls.put(20517, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_S, crystalmaxenchant(), 10, null));
+		_scrolls.put(22006, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_D, crystalmaxenchant(), 10, null));
+		_scrolls.put(22007, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_C, crystalmaxenchant(), 10, null));
+		_scrolls.put(22008, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_B, crystalmaxenchant(), 10, null));
+		_scrolls.put(22009, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_A, crystalmaxenchant(), 10, null));
		// Armor Enchant Scrolls
-		_scrolls.put(20518, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_S, 0, 10, null));
-		_scrolls.put(22010, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_D, 0, 10, null));
-		_scrolls.put(22011, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_C, 0, 10, null));
-		_scrolls.put(22012, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_B, 0, 10, null));
-		_scrolls.put(22013, new EnchantScroll(false, false, false, false, L2Item.CRYSTAL_A, 0, 10, null));
+		_scrolls.put(20518, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_S, crystalmaxenchant(), 10, null));
+		_scrolls.put(22010, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_D, crystalmaxenchant(), 10, null));
+		_scrolls.put(22011, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_C, crystalmaxenchant(), 10, null));
+		_scrolls.put(22012, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_B, crystalmaxenchant(), 10, null));
+		_scrolls.put(22013, new EnchantScroll(false, false, false, true, L2Item.CRYSTAL_A, crystalmaxenchant(), 10, null));

		// Ancient Weapon Enchant Crystal
		_scrolls.put(20519, new EnchantScroll(true, false, false, true, L2Item.CRYSTAL_S, 16, 10, null));
@@ -305,6 +291,22 @@
		return _scrolls.get(scroll.getItemId());
	}

+	
+	private static int maxenchant()
+	{
+		return Config.MAX_ENCHANT;
+	}
+
+	private static int blessedmaxenchant()
+	{
+		return Config.BLESSED_MAX_ENCHANT;
+	}
+	
+	private static int crystalmaxenchant()
+	{
+		return Config.CRYSTAL_MAX_ENCHANT;
+	}
+	
	/**
	 * Return enchant template for support item
	 */

 

Configs:

# Max enchant with Simple scrolls ?
MaxEnchant = 8

# Max enchant with Blessed scrolls ?
BlessedMaxEnchant = 16

# Max enchant with Crystal scrolls ?
CrystalMaxEnchant = 26

 

Working on Freya(L2jServer)

Posted
    ### Eclipse Workspace Patch 1.0
    #P L2_GameServer
    Index: java/config/Character.properties
    ===================================================================
    --- java/config/Character.properties   (revision 1)
    +++ java/config/Character.properties   (working copy)
    @@ -288,6 +288,12 @@
    BlessedEnchantChanceArmor = 66
    BlessedEnchantChanceJewelry = 66
     
    +# DEFAULT NEEDS TO BE VERIFIED, MUST BE CHANGED HERE AND IN CONFIG.JAVA IF NOT CORRECT
    +# Default: 50,50,50
    +CrystalEnchantChanceWeapon = 50
    +CrystalEnchantChanceArmor = 50
    +CrystalEnchantChanceJewelry = 50
    +
    # This is the enchant limit, if set to 0, there will be no limit.
    # Example: If this is set to 10, the maximum enchant will be 10.
    # Default: 0, 0, 0
    Index: java/net/sf/l2j/Config.java
    ===================================================================
    --- java/net/sf/l2j/Config.java   (revision 1)
    +++ java/net/sf/l2j/Config.java   (working copy)
    @@ -813,6 +823,9 @@
       public static int BLESSED_ENCHANT_CHANCE_WEAPON;
       public static int BLESSED_ENCHANT_CHANCE_ARMOR;
       public static int BLESSED_ENCHANT_CHANCE_JEWELRY;
    +   public static int CRYSTAL_ENCHANT_CHANCE_WEAPON;
    +   public static int CRYSTAL_ENCHANT_CHANCE_ARMOR;
    +   public static int CRYSTAL_ENCHANT_CHANCE_JEWELRY;
       public static int ENCHANT_MAX_WEAPON;
       public static int ENCHANT_MAX_ARMOR;
       public static int ENCHANT_MAX_JEWELRY;
    @@ -1237,6 +1250,9 @@
                   BLESSED_ENCHANT_CHANCE_WEAPON = Integer.parseInt(Character.getProperty("BlessedEnchantChanceWeapon", "66"));
                   BLESSED_ENCHANT_CHANCE_ARMOR = Integer.parseInt(Character.getProperty("BlessedEnchantChanceArmor", "66"));
                   BLESSED_ENCHANT_CHANCE_JEWELRY = Integer.parseInt(Character.getProperty("BlessedEnchantChanceJewelry", "66"));
    +               CRYSTAL_ENCHANT_CHANCE_WEAPON = Integer.parseInt(Character.getProperty("CrystalEnchantChanceWeapon", "50"));
    +               CRYSTAL_ENCHANT_CHANCE_ARMOR = Integer.parseInt(Character.getProperty("CrystalEnchantChanceArmor", "50"));
    +               CRYSTAL_ENCHANT_CHANCE_JEWELRY = Integer.parseInt(Character.getProperty("CrystalEnchantChanceJewelry", "50"));
                   ENCHANT_MAX_WEAPON = Integer.parseInt(Character.getProperty("EnchantMaxWeapon", "0"));
                   ENCHANT_MAX_ARMOR = Integer.parseInt(Character.getProperty("EnchantMaxArmor", "0"));
                   ENCHANT_MAX_JEWELRY = Integer.parseInt(Character.getProperty("EnchantMaxJewelry", "0"));
    Index: java/net/sf/l2j/gameserver/network/clientpackets/AbstractEnchantPacket.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/network/clientpackets/AbstractEnchantPacket.java   (revision 1)
    +++ java/net/sf/l2j/gameserver/network/clientpackets/AbstractEnchantPacket.java   (working copy)
    @@ -178,6 +178,19 @@
                else
                   chance = Config.BLESSED_ENCHANT_CHANCE_ARMOR;
             }
    +         if (_isCrystal)
    +         {
    +            // crystal scrolls does not use support items
    +            if (supportItem != null)
    +               return -1;
    +
    +            if (_isWeapon)
    +               chance = Config.CRYSTAL_ENCHANT_CHANCE_WEAPON;
    +            else if (isAccessory)
    +               chance = Config.CRYSTAL_ENCHANT_CHANCE_JEWELRY;
    +            else
    +               chance = Config.CRYSTAL_ENCHANT_CHANCE_ARMOR;
    +         }
             else
             {
                if (_isWeapon)
     

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Hello everyone I'm Albert, Starting now with the dream on have a L2 server, I'm having several issues with RS and I need someone help to Create an skill and implement to the correct class ID and make it work. Skill Required from me is  Festival Sweep  Skill or Item with the ability. I really need help guys and then after if possible i would need NPC and skins with .dressme        
    • Changeset 410 (3371)   Makers, NpcAi / Desires, Cursed Weapon rework, Bugfixes, Admincommands, Movement, Organization   Makers Fix ghost corpses. Introduce task manager for MultiSpawn spawn schedule. Introduce task managers for Npc respawn and despawn tasks. Add missing random treasurebox maker. NpcAi / Desires AttackableAttack > NpcAttack, allowing ATTACK_FINISHED event over Npc. Merge all reduceWeight from NpcAI operations. Don't broadcast MoveToPawn packet for cast hold scenarii. CH and CP managers use hold cast. Probably way more to add. Rework DesireQueue#addOrUpdate to avoid to generate a List. Drop _isInHitAnimation, avoid twice runAI calls upon attack end animation, save a ThreadPool. Implement Desire#isInvalid, used over the main loop to clean invalid Desires. All sided getDesires().removeIf are dropped, notably over AggroList/HateList. Cursed Weapon rework Fix potential task scheduling issues, reworking the whole layers. Reduce code by 1/3. Use L2OFF formulas/data for item drop rate, staging process. CW end duration now decreases when killing other Players. Bugfixes Revert schedule part from ThreadPool. Fix Pet inventory IU. Ty Denzel for the report. Fix Pet item timestamp reuse delay. Ty artemis for the fix. Disable automatic beastshots when his owner dies. Ty Root for the report. Player cannot craft while casting a skill, nor trade. Ty Root for the report. Add missing weight checks for player/summon pickup, and player craft. Ty Root for the report. Implement /graduatelist command, which displays a list of clan academy graduates for the past week. Ty RooT for the report. Fix PLAYING_FOR_LONG_TIME concept ; rest message is server related, not Player related. Ty RooT for the report. Player should stop movement when opening store. Fix Q351 occurences of itemId 4310 by 4407 one + slight fix. Fix Q365 missing memoState + poison skillId. Ty Root for the report. Fix Q417 Torai despawn over cond 11. Fix Q216 4 missing npcIds. Ty Karudin for the report. Fix the invalid comment of DeleteCharAfterDays Config. Fix NPC drop penalty level calculation. Ty Bandnentans for the report. Items are now dropped in a 30/45 donut shape around dropper. Ty Bandnentans for the report. PartyMatch fixes Don't show Party members or CW holder as available waiting members. You can't show overall List or join a PartyMatch room as CW holder. CW owner, upon acquisition, leave PartyMatch system. PartyMatch window is now automatically closed upon Player#removeMeFromPartyMatch. Remove Player from PartyMatch if Player and newly joined Party leader PartyMatch rooms differ. You can't join or be invited in a PartyMatch room if already partying/CW holding. Fix ShowLicence config when set to false. Ty artemis for the fix. Fix maximum number of macros. Ty artemis for the fix. Fix invalid IU update over //enchant. Ty artemis for the fix. Fix Castle Mass Gatekeeper HTMs. Ty kingNik0n for the fix. Drop _disabledItems implementation. Won't be used by next refactors. Ty artemis for the report. Fix loading handlers under debug. Ty Keku for the fix. Fix character_macroses table structure (commands = 12x32 chars minimum). Admincommands Merge all old spawn admincommands (//list_spawns, //spawn, //unspawnall, //respawnall, //delete) to //spawn and //unspawn (previously //delete). Generate //help. //unspawn works over all ASpawn. Merge all old fence admincommands (//spawnfence, //deletefence, //listfence) to //fence [add|remove], generate AdminFence. They now use proper Pagination. You can also teleport to it. Implementation of //show manor. Implementation of //set quest <id> [cond]. Related items must be hand-given. Implementation of //set henna [page] [add|remove symbolId]. The hennas are still bound to game logic (slots, canBeUsedBy). Movement - Ty LaRoja, Bandnentans Fix Boats IOOBE. Adapt getHeight logic from L2OFF. Introduce back WASD movement, handle boat board/unboard. Fix WATER/FLY movement logic. Avoid to pathfind diagonal cells with detected obstacle. Organization Addition of QuestVars class, holding all related variables from quests (itemIds, npcIds, questNames, sounds, etc), allowing to reduce length of each script while reusing variables. 100+ cloned variables were deleted. Refactor geometry package and Territory. Territory is now a unique 3D shape, holding any type of 2D geometry.  Remove few useless Location#clone uses. Implementation of ItemContainer#forEachItem. Clean many unused FrequentSkill. The whole enum is questionable. Drop MathUtil#checkIfInRange, implement WorldObject#isInStrictRadius (involve collision of that WorldObject, and potential WorldObject parameter). WorldObject#isIn2DRadius parameter is now a Point2D, not a Location (since a Location inherits Point2D, Location are still usable as parameter). Rework Pagination#generatePages to handle page number > 1000. Use Pagination over Tryskell SchemeBuffer. Ty CUCU23 for the share.
    • It's a custom instance used as Event not retail - like. You can re-create it easily.
    • GRAND OPENING TODAY !!! FROM - 16/05/2025, FRIDAY, 20:00 +3 GMT !
  • Topics

×
×
  • Create New...