Jump to content

Enchant after break with crystal scroll.


Recommended Posts

Hey guys !!

This is my first code ever so i'm really happy for it.

It's just a simple code.

 

How it works:

So, it's the enchant that remains when a weapon/armor/etc. break, after enchanting it with crystal scrolls.

Enchant after break with crystal scroll. Tested in l2jfrozen, works fine.

 

Coded for Interlude: L2JFrozen

Credits: Me

=============================================================
head-src/com/l2jfrozen/config.java (rev 988)
=============================================================
+++ 2903

public static int BREAK_ENCHANT;
+	public static int BREAK_ENCHANT2; 
public static int GM_OVER_ENCHANT;
=============================================================
head-src/com/l2jfrozen/config.java (rev 988)
=============================================================
+++ 3208

		BREAK_ENCHANT = Integer.valueOf(ENCHANTSetting.getProperty("BreakEnchant", "0"));
+			BREAK_ENCHANT2 = Integer.valueOf(ENCHANTSetting.getProperty("BreakEnchant2", "0"));
+			
		MAX_ITEM_ENCHANT_KICK = Integer.parseInt(ENCHANTSetting.getProperty("EnchantKick", "0"));


======================================================================
com/l2jfrozen/gameserver/network/clientpackets/requestEnchantItem.java
======================================================================
+++ 699

		if(blessedScroll){
			item.setEnchantLevel(Config.BREAK_ENCHANT);
			item.updateDatabase();
+				else if(crystalScroll){
+					item.setEnchantLevel(Config.BREAK_ENCHANT2);
+					item.updateDatabase();
			}else if(crystalScroll){
			item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN);
			item.updateDatabase();


======================================================================
l2jfrozen_gameserver/config/head/enchant.properties
======================================================================
+++ 127,128,129

# Enchant after break with blessed scroll.
BreakEnchant = 0
+
+# Enchant after break with crystal scroll.
+BreakEnchant2 = 0
+
# Limit enchant GM players (// setew and others) (0 disabled)
GMOverEnchant = 0

Link to comment
Share on other sites

+				if(crystalScroll){

 

to

 

+				else if(crystalScroll){

 

the ressults will be the same, but definetly there whould be an else there, anyway gj keep up and soon you will make smth great

Link to comment
Share on other sites

+				if(crystalScroll){

 

to

 

+				else if(crystalScroll){

 

the ressults will be the same, but definetly there whould be an else there, anyway gj keep up and soon you will make smth great

Fixed.

Thanks a lot for kind words. :)

I really respect you as developer so that means a lot to me.

Link to comment
Share on other sites

lol the config "crystal_enchant_min" is the same as your code...when break it will back to the value you did on config..

Code was tested and it worked without any problems.

Link to comment
Share on other sites

didnt said its bugged...i said u posted an existed code on frozen pack

 

			}else if(crystalScroll){
			item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN);
			item.updateDatabase();

You are wrong here.. anyway this not exist on frozen.

This is for crystal scrolls not for blessed. Frozen has only for blessed scrolls not for crystal.

Anyway let's stop spamming ..  ;)

Link to comment
Share on other sites

Dude Crystal Min Enchant is for crystals...frozen have for both options lol

If u make Crystal Min Enchant 6 when it faisl its gonna back to +6

I don't know if that works but in any case if someone want to use my code then he/she can do it. :)

That's all.

Link to comment
Share on other sites

Dude Crystal Min Enchant is for crystals.....frozen have for both options lol

 

Indeed, it cointain option for MINIMAL enchant in order to use crystal, but not to keeping X + while break. At least I guess so.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...