Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
- ===================================================================
- --- D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 318)
- +++ D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (working copy)
- @@ -201,6 +201,185 @@
- SystemMessage sm;
- int chance = 0;
- int maxEnchantLevel = 0;
- +
- + if (Config.ENCHANT_SCROLL_CRYSTAL_SYSTEM)
- + {
- + if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)
- + {
- + maxEnchantLevel = Config.ENCHANT_MAX_WEAPON_CRYSTAL;
- + for (int scrollId : ENCHANT_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_WEAPON;
- + break;
- + }
- + }
- + for (int scrollId : CRYSTAL_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_WEAPON_CRYSTAL;
- + ;
- + break;
- + }
- + }
- + for (int scrollId : BLESSED_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_WEAPON_BLESSED;
- + break;
- + }
- + }
- + }
- + else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)
- + {
- + maxEnchantLevel = Config.ENCHANT_MAX_ARMOR_CRYSTAL;
- + for (int scrollId : ENCHANT_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_ARMOR;
- + break;
- + }
- + }
- + for (int scrollId : CRYSTAL_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_ARMOR_CRYSTAL;
- + break;
- + }
- + }
- + for (int scrollId : BLESSED_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_ARMOR_BLESSED;
- + break;
- + }
- + }
- + }
- + else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)
- + {
- + maxEnchantLevel = Config.ENCHANT_MAX_JЕWELRY_CRYSTAL;
- + for (int scrollId : ENCHANT_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_JEWELRY;
- + break;
- + }
- + }
- + for (int scrollId : CRYSTAL_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_JEWELRY_CRYSTAL;
- + break;
- + }
- + }
- + for (int scrollId : BLESSED_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_JEWELRY_BLESSED;
- + break;
- + }
- + }
- + }
- + }
- +
- + if (Config.ENCHANT_SCROLL_BLESSED_SYSTEM)
- + {
- + if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)
- + {
- + maxEnchantLevel = Config.ENCHANT_MAX_WEAPON_BLESSED;
- + for (int scrollId : ENCHANT_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_WEAPON;
- + break;
- + }
- + }
- + for (int scrollId : CRYSTAL_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_WEAPON_CRYSTAL;
- + ;
- + break;
- + }
- + }
- + for (int scrollId : BLESSED_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_WEAPON_BLESSED;
- + break;
- + }
- + }
- + }
- + else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)
- + {
- + maxEnchantLevel = Config.ENCHANT_MAX_ARMOR_BLESSED;
- + for (int scrollId : ENCHANT_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_ARMOR;
- + break;
- + }
- + }
- + for (int scrollId : CRYSTAL_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_ARMOR_CRYSTAL;
- + break;
- + }
- + }
- + for (int scrollId : BLESSED_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_ARMOR_BLESSED;
- + break;
- + }
- + }
- + }
- + else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)
- + {
- + maxEnchantLevel = Config.ENCHANT_MAX_JЕWELRY_BLESSED;
- + for (int scrollId : ENCHANT_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_JEWELRY;
- + break;
- + }
- + }
- + for (int scrollId : CRYSTAL_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_JEWELRY_CRYSTAL;
- + break;
- + }
- + }
- + for (int scrollId : BLESSED_SCROLLS)
- + {
- + if (scroll.getItemId() == scrollId)
- + {
- + chance = Config.ENCHANT_CHANCE_JEWELRY_BLESSED;
- + break;
- + }
- + }
- + }
- + }
- +
- if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)
- {
- maxEnchantLevel = Config.ENCHANT_MAX_WEAPON;
- Index: D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/java/net/sf/l2j/Config.java
- ===================================================================
- --- D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/java/net/sf/l2j/Config.java (revision 316)
- +++ D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/java/net/sf/l2j/Config.java (working copy)
- @@ -309,6 +309,14 @@
- public static boolean JAIL_IS_PVP;
- public static boolean JAIL_DISABLE_CHAT;
- public static boolean JAIL_SET_PARA;
- + public static boolean ENCHANT_SCROLL_CRYSTAL_SYSTEM;
- + public static int ENCHANT_MAX_WEAPON_CRYSTAL;
- + public static int ENCHANT_MAX_ARMOR_CRYSTAL;
- + public static int ENCHANT_MAX_JЕWELRY_CRYSTAL;
- + public static boolean ENCHANT_SCROLL_BLESSED_SYSTEM;
- + public static int ENCHANT_MAX_WEAPON_BLESSED;
- + public static int ENCHANT_MAX_ARMOR_BLESSED;
- + public static int ENCHANT_MAX_JЕWELRY_BLESSED;
- /** Modification Settings Parameters */
- public static boolean CUSTOM_START_LEVEL;
- @@ -1364,6 +1372,14 @@
- ENCHANT_MAX_WEAPON = Integer.parseInt(Other.getProperty("EnchantMaxWeapon", "255"));
- ENCHANT_MAX_ARMOR = Integer.parseInt(Other.getProperty("EnchantMaxArmor", "255"));
- ENCHANT_MAX_JEWELRY = Integer.parseInt(Other.getProperty("EnchantMaxJewelry", "255"));
- + ENCHANT_SCROLL_CRYSTAL_SYSTEM = Boolean.parseBoolean(Other.getProperty("EnchantCrystalCustom", "False"));
- + ENCHANT_MAX_JЕWELRY_CRYSTAL = Integer.parseInt(Other.getProperty("EnchantMaxJewelryCrystal", "255"));
- + ENCHANT_MAX_ARMOR_CRYSTAL = Integer.parseInt(Other.getProperty("EnchantMaxArmorCrystal", "255"));
- + ENCHANT_MAX_WEAPON_CRYSTAL = Integer.parseInt(Other.getProperty("EnchantMaxWeaponCrystal", "255"));
- + ENCHANT_SCROLL_BLESSED_SYSTEM = Boolean.parseBoolean(Other.getProperty("EnchantBlessedCustom", "False"));
- + ENCHANT_MAX_JЕWELRY_BLESSED = Integer.parseInt(Other.getProperty("EnchantMaxJewelryBlessed", "255"));
- + ENCHANT_MAX_ARMOR_BLESSED = Integer.parseInt(Other.getProperty("EnchantMaxArmorBlessed", "255"));
- + ENCHANT_MAX_WEAPON_BLESSED = Integer.parseInt(Other.getProperty("EnchantMaxWeaponBlessed", "255"));
- ENCHANT_SAFE_MAX = Integer.parseInt(Other.getProperty("EnchantSafeMax", "3"));
- ENCHANT_SAFE_MAX_FULL = Integer.parseInt(Other.getProperty("EnchantSafeMaxFull", "4"));
- HP_REGEN_MULTIPLIER = Double.parseDouble(Other.getProperty("HpRegenMultiplier", "100")) /100;
- @@ -2363,6 +2379,12 @@
- else if (pName.equalsIgnoreCase("EnchantMaxWeapon")) ENCHANT_MAX_WEAPON = Integer.parseInt(pValue);
- else if (pName.equalsIgnoreCase("EnchantMaxArmor")) ENCHANT_MAX_ARMOR = Integer.parseInt(pValue);
- else if (pName.equalsIgnoreCase("EnchantMaxJewelry")) ENCHANT_MAX_JEWELRY = Integer.parseInt(pValue);
- + else if (pName.equalsIgnoreCase("EnchantMaxJewelryCrystal")) ENCHANT_MAX_JЕWELRY_CRYSTAL = Integer.parseInt(pValue);
- + else if (pName.equalsIgnoreCase("EnchantMaxArmorCrystal")) ENCHANT_MAX_ARMOR_CRYSTAL = Integer.parseInt(pValue);
- + else if (pName.equalsIgnoreCase("EnchantMaxWeaponCrystal")) ENCHANT_MAX_WEAPON_CRYSTAL = Integer.parseInt(pValue);
- + else if (pName.equalsIgnoreCase("EnchantMaxJewelryBlessed")) ENCHANT_MAX_JЕWELRY_BLESSED = Integer.parseInt(pValue);
- + else if (pName.equalsIgnoreCase("EnchantMaxArmorBlessed")) ENCHANT_MAX_ARMOR_BLESSED = Integer.parseInt(pValue);
- + else if (pName.equalsIgnoreCase("EnchantMaxWeaponBlessed")) ENCHANT_MAX_WEAPON_BLESSED = Integer.parseInt(pValue);
- else if (pName.equalsIgnoreCase("EnchantSafeMax")) ENCHANT_SAFE_MAX = Integer.parseInt(pValue);
- else if (pName.equalsIgnoreCase("EnchantSafeMaxFull")) ENCHANT_SAFE_MAX_FULL = Integer.parseInt(pValue);
- else if (pName.equalsIgnoreCase("HpRegenMultiplier")) HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
- Index: D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/Settings/General/Other.properties
- ===================================================================
- --- D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/Settings/General/Other.properties (revision 316)
- +++ D:/WorkSpace/Lineage 2/Development/Workspace/GameServer/Settings/General/Other.properties (working copy)
- @@ -58,11 +58,29 @@
- EnchantChanceArmorBlessed = 52
- EnchantChanceJewelryBlessed = 54
- -# Enchant limit [default = 0 (unlimited)]
- +# Enchant limit [Default = 0 (unlimited)] [Normal Scrolls]
- EnchantMaxWeapon = 0
- EnchantMaxArmor = 0
- EnchantMaxJewelry = 0
- +# Custom Crystal Scroll System
- +# Default: False
- +EnchantCrystalCustom = False
- +
- +# Enchant limit [Crystal Scrolls]
- +EnchantMaxWeaponCrystal = 0
- +EnchantMaxArmorCrystal = 0
- +EnchantMaxJewelryCrystal = 0
- +
- +# Custom Blessed Scroll System
- +# Default: False
- +EnchantBlessedCustom = False
- +
- +# Enchant limit [Blessed Scrolls]
- +EnchantMaxWeaponBlessed = 0
- +EnchantMaxArmorBlessed = 0
- +EnchantMaxJewelryBlessed = 0
- +
- # If EnchantSafeMax is set to for ex '8' the item will be safly enchanted to '8'
- # regardless of enchant chance(default = 3 for EnchantSafeMax and default = 4 for EnchantSafeMaxFull)
- # EnchantSafeMaxFull is for full body armor (upper and lower)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement