Page 1 of 1

How can I change Enchant rates for diferent scrolls

Posted: Wed Sep 30, 2009 9:36 pm
by Foxaurus
L2J Revision 3584:
L2JDP Revision 6674:

Hi all.

I serch info for "how to change the rates of enchant for the diferent scrolls" but i dont see any solution.

I need that :

I need change the Crystal Scroll of Enchant rate (50%)

Change the normal Scroll of Enchant rate to (65%)

And change the Blessed Scroll of enchant Rate to (75%)


How can i doo that ?

I see one post that solution is changing the values in AbstractEnchantPacket.java but i dont have that file in my l2j server.

Then how i can change that variables , because i need to configure 3 diferent scrolls with 3 diferent enchant rates.

Can anybody help me ? Or can anybody tell me if there is any guide or tutorial about that ?

Thx for all.

Re: How can I change Enchant rates for diferent scrolls

Posted: Wed Sep 30, 2009 9:39 pm
by devo
Character.properties

enchanting, there you can set rate for normal scrolls and blessed.

Re: How can I change Enchant rates for diferent scrolls

Posted: Wed Sep 30, 2009 9:45 pm
by Foxaurus
yah i know that , but i can't change the crystal scroll that i need...........

Re: How can I change Enchant rates for diferent scrolls

Posted: Wed Sep 30, 2009 9:51 pm
by devo
here you are

Code: Select all

### Eclipse Workspace Patch 1.0#P L2_GameServerIndex: java/config/Character.properties===================================================================--- java/config/Character.properties	(revision 3587)+++ 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, 0Index: java/net/sf/l2j/Config.java===================================================================--- java/net/sf/l2j/Config.java	(revision 3587)+++ 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 3587)+++ 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) 

Re: How can I change Enchant rates for diferent scrolls

Posted: Wed Sep 30, 2009 11:57 pm
by Foxaurus
Ok thx for that , i see that i have to add all the lines with "+" in the Character.properities , Config.java and AbstractEnchantPacket.java but i have the next problem , i cant see ( find ) the AbstractEnchantPacket.java and Config.java.

What i have to do ? because i see that is a Eclipse compilation file , but i have the DP , and Server compiled (unstable) ..

Then ? i have to download decompiled files and config , compile , and install it ?

Re: How can I change Enchant rates for diferent scrolls

Posted: Thu Oct 01, 2009 11:26 am
by Ashitaka
Hi Foxaurus,

If you want to edit the core code, you have to download, edit and recompile the code, yes.

Refer to the documentation:
http://www.l2jserver.com/trac/wiki/Eclipse <-- Download (and also compile after edition) the GS code.
http://www.l2jdp.com/trac/wiki/Eclipse<-- Download the DP code. (same as GS but in DP side).
http://www.l2jserver.com/trac/wiki/ApplyingPatches <-- Understand what is a patch and how to use it.

Once you have done the avobe mentioned you will be able to start working. Good luck!

Re: How can I change Enchant rates for diferent scrolls

Posted: Sun Sep 11, 2011 10:13 pm
by Masterd3v1l
i have a weird problem over here when i aplly all changes i go to try build ant but instead of ant i have run as> Java applet and nthing else so i cant build. what should i do?