In many servers you can not enchant a hero weapon
here is the code in order to enable this feature!
at net/sf/l2j/Config.java
line ~1065
public static int ENCHANT_CHANCE_WEAPON_BLESSED;
public static int ENCHANT_CHANCE_ARMOR_BLESSED;
public static int ENCHANT_CHANCE_JEWELRY_BLESSED;
+ /** Enable/disable Hero Weapons Enchantment */
+ public static boolean ALLOW_HERO_ENCHANTMENT;
// Character multipliers
/** Multiplier for character HP regeneration */
public static double HP_REGEN_MULTIPLIER;
line ~1627
ENCHANT_CHANCE_ARMOR_BLESSED = Integer.parseInt(otherSettings.getProperty("EnchantChanceArmorBlessed", "85"));
ENCHANT_CHANCE_JEWELRY_BLESSED = Integer.parseInt(otherSettings.getProperty("EnchantChanceJewelryBlessed", "85"));
+ ALLOW_HERO_ENCHANTMENT = Boolean.parseBoolean(otherSettings.getProperty("EnchantHeroAllow", "True"));
--------------------------------------
at net/sf/l2j/gameserver/clientpackets/RequestEnchantItem.java
line ~74
activeChar.setActiveEnchantItem(null);
if (item == null || scroll == null) return;
- // can't enchant rods, hero weapons and shadow items
+ // can't enchant rods, and shadow items
if(item.getItem().getItemType() == L2WeaponType.ROD
- || item.getItemId() >= 6611 && item.getItemId() <= 6621
|| item.isShadowItem()
)
+ // can't enchant Hero Weapons
+ if(item.getItemId() >= 6611 && item.getItemId() <= 6621 && !Config.ALLOW_HERO_ENCHANTMENT)
+ {
+ activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION));
+ return;
+ }
if(item.getItem().getType2() == L2Item.TYPE2_ACCESSORY && item.getEnchantLevel() >= Config.ENCHANT_MAX_JEWELRY
------------------------------------
At other.properties
+ #Allow hero weapons enchantment?
+ EnchantHeroAllow = True
Not something special but its a good start for me
Credits: to me
PS: Its not tested but it shall be fine.
If you find somethink wrong please let me know!