Index: java/net/sf/l2j/gameserver/handler/itemhandlers/EnchantScrolls.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/itemhandlers/EnchantScrolls.java (revision 5343)
+++ java/net/sf/l2j/gameserver/handler/itemhandlers/EnchantScrolls.java (working copy)
@@ -35,6 +35,7 @@
951, 952, 953, 954, 6573, 6574, // c grade
955, 956, 957, 958, 6575, 6576, // d grade
959, 960, 961, 962, 6577, 6578 // s grade
+ , 65535
};
Index: java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java
===================================================================
--- java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java (revision 5343)
+++ java/net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java (working copy)
@@ -206,6 +206,34 @@
|| (item.getItem().getBodyPart() == L2Item.SLOT_FULL_ARMOR
&& item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL))
chance = 100;
+
+ if (scroll.getItemId() == 65535)
+ {
+ int NEEDED_ENCHANT_LEVEL = 10,
+ MAX_ENCHANT_LEVEL = 16,
+ CHANCE_WEAPON = 80,
+ CHANCE_ARMOR = 80,
+ CHANCE_JEWEL = 80;
+
+ if (item.getEnchantLevel() < NEEDED_ENCHANT_LEVEL || item.getEnchantLevel() > MAX_ENCHANT_LEVEL)
+ {
+ activeChar.sendMessage("You can only enchant with this scroll from +"+NEEDED_ENCHANT_LEVEL+" to +"+MAX_ENCHANT_LEVEL+".");
+ return;
+ }
+
+ if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)
+ {
+ chance = CHANCE_WEAPON;
+ }
+ if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)
+ {
+ chance = CHANCE_ARMOR;
+ }
+ if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)
+ {
+ chance = CHANCE_JEWEL;
+ }
+ }
if (Rnd.get(100) < chance)
{
Prepei na work. Opou 65535 antikatestise to me to item id apo to custom scroll sou.