Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: net.sf.l2j;Config.java
- ===================================================================
- --- net.sf.l2j;Config.java (revision 84)
- +++ net.sf.l2j;Config.java (working copy)
- - public static final String GEOENGINE_FILE = "./config/main/geoengine.properties";
- + public static final String GEOENGINE_FILE = "./config/main/geoengine.properties";
- + public static final String ENCHANT_FILE = "./config/main/enchant.properties";
- + /** Enchant item custom */
- + public static HashMap<Integer, Integer> NORMAL_WEAPON_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> BLESS_WEAPON_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> CRYSTAL_WEAPON_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> DONATOR_WEAPON_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> NORMAL_ARMOR_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> BLESS_ARMOR_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> CRYSTAL_ARMOR_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> DONATOR_ARMOR_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> NORMAL_JEWELRY_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> BLESS_JEWELRY_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> CRYSTAL_JEWELRY_ENCHANT_LEVEL = new HashMap<>();
- + public static HashMap<Integer, Integer> DONATOR_JEWELRY_ENCHANT_LEVEL = new HashMap<>();
- + public static boolean ENCHANT_HERO_WEAPON;
- + public static boolean SCROLL_STACKABLE;
- + public static int GOLD_WEAPON;
- + public static int GOLD_ARMOR;
- + public static int ENCHANT_SAFE_MAX;
- + public static int ENCHANT_SAFE_MAX_FULL;
- + public static int ENCHANT_WEAPON_MAX;
- + public static int ENCHANT_ARMOR_MAX;
- + public static int ENCHANT_JEWELRY_MAX;
- + public static int BLESSED_ENCHANT_WEAPON_MAX;
- + public static int BLESSED_ENCHANT_ARMOR_MAX;
- + public static int BLESSED_ENCHANT_JEWELRY_MAX;
- + public static int BREAK_ENCHANT;
- + public static int CRYSTAL_ENCHANT_MIN;
- + public static int CRYSTAL_ENCHANT_WEAPON_MAX;
- + public static int CRYSTAL_ENCHANT_ARMOR_MAX;
- + public static int CRYSTAL_ENCHANT_JEWELRY_MAX;
- + public static int DONATOR_ENCHANT_MIN;
- + public static int DONATOR_ENCHANT_WEAPON_MAX;
- + public static int DONATOR_ENCHANT_ARMOR_MAX;
- + public static int DONATOR_ENCHANT_JEWELRY_MAX;
- + public static boolean DONATOR_DECREASE_ENCHANT;
- + public static boolean ENABLE_ENCHANT_ANNOUNCE;
- + public static String ENCHANT_ANNOUNCE_LEVEL;
- + public static ArrayList<Integer> LIST_ENCHANT_ANNOUNCE_LEVEL = new ArrayList<>();
- +
- + /**
- + * Loads enchant settings.
- + */
- + private static final void loadEnchant()
- + {
- + final ExProperties enchant = initProperties(Config.ENCHANT_FILE);
- +
- + String[] propertySplit = enchant.getProperty("NormalWeaponEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + NORMAL_WEAPON_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("BlessWeaponEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + BLESS_WEAPON_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("CrystalWeaponEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + CRYSTAL_WEAPON_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("DonatorWeaponEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + System.out.println("invalid config property");
- + else
- + try
- + {
- + DONATOR_WEAPON_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + System.out.println("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("NormalArmorEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + NORMAL_ARMOR_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("BlessArmorEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + BLESS_ARMOR_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("CrystalArmorEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + CRYSTAL_ARMOR_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("DonatorArmorEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + System.out.println("invalid config property");
- + else
- + try
- + {
- + DONATOR_ARMOR_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + System.out.println("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("NormalJewelryEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + NORMAL_JEWELRY_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("BlessJewelryEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + BLESS_JEWELRY_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("CrystalJewelryEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + _log.info("invalid config property");
- + else
- + try
- + {
- + CRYSTAL_JEWELRY_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + _log.info("invalid config property");
- + }
- + }
- + propertySplit = enchant.getProperty("DonatorJewelryEnchantLevel", "").split(";");
- + for (String readData : propertySplit)
- + {
- + String[] writeData = readData.split(",");
- + if (writeData.length != 2)
- + System.out.println("invalid config property");
- + else
- + try
- + {
- + DONATOR_JEWELRY_ENCHANT_LEVEL.put(Integer.valueOf(Integer.parseInt(writeData[0])), Integer.valueOf(Integer.parseInt(writeData[1])));
- + }
- + catch (NumberFormatException nfe)
- + {
- + if (DEBUG)
- + nfe.printStackTrace();
- + if (!readData.equals(""))
- + System.out.println("invalid config property");
- + }
- + }
- + ENCHANT_HERO_WEAPON = Boolean.parseBoolean(enchant.getProperty("EnableEnchantHeroWeapons", "False"));
- +
- + GOLD_WEAPON = Integer.parseInt(enchant.getProperty("IdEnchantDonatorWeapon", "10010"));
- +
- + GOLD_ARMOR = Integer.parseInt(enchant.getProperty("IdEnchantDonatorArmor", "10011"));
- +
- + ENCHANT_SAFE_MAX = Integer.parseInt(enchant.getProperty("EnchantSafeMax", "3"));
- +
- + ENCHANT_SAFE_MAX_FULL = Integer.parseInt(enchant.getProperty("EnchantSafeMaxFull", "4"));
- +
- + SCROLL_STACKABLE = Boolean.parseBoolean(enchant.getProperty("ScrollStackable", "False"));
- +
- + ENCHANT_WEAPON_MAX = Integer.parseInt(enchant.getProperty("EnchantWeaponMax", "25"));
- + ENCHANT_ARMOR_MAX = Integer.parseInt(enchant.getProperty("EnchantArmorMax", "25"));
- + ENCHANT_JEWELRY_MAX = Integer.parseInt(enchant.getProperty("EnchantJewelryMax", "25"));
- +
- + BLESSED_ENCHANT_WEAPON_MAX = Integer.parseInt(enchant.getProperty("BlessedEnchantWeaponMax", "25"));
- + BLESSED_ENCHANT_ARMOR_MAX = Integer.parseInt(enchant.getProperty("BlessedEnchantArmorMax", "25"));
- + BLESSED_ENCHANT_JEWELRY_MAX = Integer.parseInt(enchant.getProperty("BlessedEnchantJewelryMax", "25"));
- +
- + BREAK_ENCHANT = Integer.valueOf(enchant.getProperty("BreakEnchant", "0")).intValue();
- +
- + CRYSTAL_ENCHANT_MIN = Integer.parseInt(enchant.getProperty("CrystalEnchantMin", "20"));
- + CRYSTAL_ENCHANT_WEAPON_MAX = Integer.parseInt(enchant.getProperty("CrystalEnchantWeaponMax", "25"));
- + CRYSTAL_ENCHANT_ARMOR_MAX = Integer.parseInt(enchant.getProperty("CrystalEnchantArmorMax", "25"));
- + CRYSTAL_ENCHANT_JEWELRY_MAX = Integer.parseInt(enchant.getProperty("CrystalEnchantJewelryMax", "25"));
- +
- + DONATOR_ENCHANT_MIN = Integer.parseInt(enchant.getProperty("DonatorEnchantMin", "20"));
- + DONATOR_ENCHANT_WEAPON_MAX = Integer.parseInt(enchant.getProperty("DonatorEnchantWeaponMax", "25"));
- + DONATOR_ENCHANT_ARMOR_MAX = Integer.parseInt(enchant.getProperty("DonatorEnchantArmorMax", "25"));
- + DONATOR_ENCHANT_JEWELRY_MAX = Integer.parseInt(enchant.getProperty("DonatorEnchantJewelryMax", "25"));
- + DONATOR_DECREASE_ENCHANT = Boolean.valueOf(enchant.getProperty("DonatorDecreaseEnchant", "false")).booleanValue();
- +
- + }
- +
- - // hexID
- - loadHexID();
- + // hexID
- + loadHexID();
- + // Loads Enchant Custom
- + loadEnchant();
- Index: net.sf.l2j.gameserver.network.clientpackets;RequestEnchantItem.java
- ===================================================================
- --- net.sf.l2j.gameserver.network.clientpackets;RequestEnchantItem.java (revision 84)
- +++ net.sf.l2j.gameserver.network.clientpackets;RequestEnchantItem.java (working copy)
- + private static final int[] DONATOR_WEAPON_SCROLL =
- + {
- + Config.GOLD_WEAPON
- + };
- + private static final int[] DONATOR_ARMOR_SCROLL =
- + {
- + Config.GOLD_ARMOR
- + };
- + private static final int[] CRYSTAL_SCROLLS =
- + {
- + 731,
- + 732,
- + 949,
- + 950,
- + 953,
- + 954,
- + 957,
- + 958,
- + 961,
- + 962
- + };
- + private static final int[] NORMAL_WEAPON_SCROLLS =
- + {
- + 729,
- + 947,
- + 951,
- + 955,
- + 959
- + };
- + private static final int[] BLESSED_WEAPON_SCROLLS =
- + {
- + 6569,
- + 6571,
- + 6573,
- + 6575,
- + 6577
- + };
- + private static final int[] CRYSTAL_WEAPON_SCROLLS =
- + {
- + 731,
- + 949,
- + 953,
- + 957,
- + 961
- + };
- + private static final int[] NORMAL_ARMOR_SCROLLS =
- + {
- + 730,
- + 948,
- + 952,
- + 956,
- + 960
- + };
- + private static final int[] BLESSED_ARMOR_SCROLLS =
- + {
- + 6570,
- + 6572,
- + 6574,
- + 6576,
- + 6578
- + };
- + private static final int[] CRYSTAL_ARMOR_SCROLLS =
- + {
- + 732,
- + 950,
- + 954,
- + 958,
- + 962
- + };
- - private int _objectId;
- + private int _objectId;
- - if (item == null || scroll == null)
- - {
- - player.sendPacket(SystemMessageId.ENCHANT_SCROLL_CANCELLED);
- - player.setActiveEnchantItem(null);
- - player.sendPacket(EnchantResult.CANCELLED);
- - return;
- - }
- + if (!Config.ENCHANT_HERO_WEAPON && item.getItemId() >= 6611 && item.getItemId() <= 6621)
- + {
- + player.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION);
- + player.setActiveEnchantItem(null);
- + return;
- + }
- + int itemType2 = item.getItem().getType2();
- + boolean enchantItem = false;
- + boolean blessedScroll = false;
- + boolean crystalScroll = false;
- + boolean donatorScroll = false;
- + int crystalId = 0;
- + switch (item.getItem().getCrystalType())
- + {
- + case A:
- + crystalId = 1461;
- + if (scroll.getItemId() == Config.GOLD_WEAPON && itemType2 == 0)
- + enchantItem = true;
- + else if (scroll.getItemId() == Config.GOLD_ARMOR && (itemType2 == 1 || itemType2 == 2))
- + enchantItem = true;
- + switch (scroll.getItemId())
- + {
- + case 729:
- + case 731:
- + case 6569:
- + if (itemType2 == 0)
- + enchantItem = true;
- + break;
- + case 730:
- + case 732:
- + case 6570:
- + if (itemType2 == 1 || itemType2 == 2)
- + enchantItem = true;
- + break;
- + }
- + break;
- + case B:
- + crystalId = 1460;
- + if (scroll.getItemId() == Config.GOLD_WEAPON && itemType2 == 0)
- + enchantItem = true;
- + else if (scroll.getItemId() == Config.GOLD_ARMOR && (itemType2 == 1 || itemType2 == 2))
- + enchantItem = true;
- + switch (scroll.getItemId())
- + {
- + case 947:
- + case 949:
- + case 6571:
- + if (itemType2 == 0)
- + enchantItem = true;
- + break;
- + case 948:
- + case 950:
- + case 6572:
- + if (itemType2 == 1 || itemType2 == 2)
- + enchantItem = true;
- + break;
- + }
- + break;
- + case C:
- + crystalId = 1459;
- + if (scroll.getItemId() == Config.GOLD_WEAPON && itemType2 == 0)
- + enchantItem = true;
- + else if (scroll.getItemId() == Config.GOLD_ARMOR && (itemType2 == 1 || itemType2 == 2))
- + enchantItem = true;
- + switch (scroll.getItemId())
- + {
- + case 951:
- + case 953:
- + case 6573:
- + if (itemType2 == 0)
- + enchantItem = true;
- + break;
- + case 952:
- + case 954:
- + case 6574:
- + if (itemType2 == 1 || itemType2 == 2)
- + enchantItem = true;
- + break;
- + }
- + break;
- + case D:
- + crystalId = 1458;
- + if (scroll.getItemId() == Config.GOLD_WEAPON && itemType2 == 0)
- + enchantItem = true;
- + else if (scroll.getItemId() == Config.GOLD_ARMOR && (itemType2 == 1 || itemType2 == 2))
- + enchantItem = true;
- + switch (scroll.getItemId())
- + {
- + case 955:
- + case 957:
- + case 6575:
- + if (itemType2 == 0)
- + enchantItem = true;
- + break;
- + case 956:
- + case 958:
- + case 6576:
- + if (itemType2 == 1 || itemType2 == 2)
- + enchantItem = true;
- + break;
- + }
- + break;
- + case S:
- + crystalId = 1462;
- + if (scroll.getItemId() == Config.GOLD_WEAPON && itemType2 == 0)
- + enchantItem = true;
- + else if (scroll.getItemId() == Config.GOLD_ARMOR && (itemType2 == 1 || itemType2 == 2))
- + enchantItem = true;
- + switch (scroll.getItemId())
- + {
- + case 959:
- + case 961:
- + case 6577:
- + if (itemType2 == 0)
- + enchantItem = true;
- + break;
- + case 960:
- + case 962:
- + case 6578:
- + if (itemType2 == 1 || itemType2 == 2)
- + enchantItem = true;
- + break;
- + }
- + break;
- + }
- + if (!enchantItem)
- + {
- + player.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION);
- + return;
- + }
- + if (scroll.getItemId() >= 6569 && scroll.getItemId() <= 6578)
- + blessedScroll = true;
- + else if (scroll.getItemId() == Config.GOLD_WEAPON || scroll.getItemId() == Config.GOLD_ARMOR)
- + donatorScroll = true;
- + else
- + for (int crystalscroll : CRYSTAL_SCROLLS)
- + if (scroll.getItemId() == crystalscroll)
- + {
- + crystalScroll = true;
- + break;
- + }
- + int chance = 0;
- + int maxEnchantLevel = 0;
- + int minEnchantLevel = 0;
- + int nextEnchantLevel = item.getEnchantLevel() + 1;
- + if (item.getItem().getType2() == 0)
- + {
- + if (blessedScroll)
- + {
- + for (int blessedweaponscroll : BLESSED_WEAPON_SCROLLS)
- + if (scroll.getItemId() == blessedweaponscroll)
- + {
- + if (item.getEnchantLevel() >= Config.BLESS_WEAPON_ENCHANT_LEVEL.size())
- + chance = Config.BLESS_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(Config.BLESS_WEAPON_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.BLESS_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + maxEnchantLevel = Config.BLESSED_ENCHANT_WEAPON_MAX;
- + break;
- + }
- + }
- + else if (crystalScroll)
- + {
- + for (int crystalweaponscroll : CRYSTAL_WEAPON_SCROLLS)
- + if (scroll.getItemId() == crystalweaponscroll)
- + {
- + if (item.getEnchantLevel() >= Config.CRYSTAL_WEAPON_ENCHANT_LEVEL.size())
- + chance = Config.CRYSTAL_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(Config.CRYSTAL_WEAPON_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.CRYSTAL_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + minEnchantLevel = Config.CRYSTAL_ENCHANT_MIN;
- + maxEnchantLevel = Config.CRYSTAL_ENCHANT_WEAPON_MAX;
- + break;
- + }
- + }
- + else if (donatorScroll)
- + {
- + for (int donateweaponscroll : DONATOR_WEAPON_SCROLL)
- + if (scroll.getItemId() == donateweaponscroll)
- + {
- + if (item.getEnchantLevel() >= Config.DONATOR_WEAPON_ENCHANT_LEVEL.size())
- + chance = Config.DONATOR_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(Config.DONATOR_WEAPON_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.DONATOR_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + minEnchantLevel = Config.DONATOR_ENCHANT_MIN;
- + maxEnchantLevel = Config.DONATOR_ENCHANT_WEAPON_MAX;
- + break;
- + }
- + }
- + else
- + for (int normalweaponscroll : NORMAL_WEAPON_SCROLLS)
- + if (scroll.getItemId() == normalweaponscroll)
- + {
- + if (item.getEnchantLevel() >= Config.NORMAL_WEAPON_ENCHANT_LEVEL.size())
- + chance = Config.NORMAL_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(Config.NORMAL_WEAPON_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.NORMAL_WEAPON_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + maxEnchantLevel = Config.ENCHANT_WEAPON_MAX;
- + break;
- + }
- + }
- + else if (item.getItem().getType2() == 1)
- + {
- + if (blessedScroll)
- + {
- + for (int blessedarmorscroll : BLESSED_ARMOR_SCROLLS)
- + if (scroll.getItemId() == blessedarmorscroll)
- + {
- + if (item.getEnchantLevel() >= Config.BLESS_ARMOR_ENCHANT_LEVEL.size())
- + chance = Config.BLESS_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(Config.BLESS_ARMOR_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.BLESS_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + maxEnchantLevel = Config.BLESSED_ENCHANT_ARMOR_MAX;
- + break;
- + }
- + }
- + else if (crystalScroll)
- + {
- + for (int crystalarmorscroll : CRYSTAL_ARMOR_SCROLLS)
- + if (scroll.getItemId() == crystalarmorscroll)
- + {
- + if (item.getEnchantLevel() >= Config.CRYSTAL_ARMOR_ENCHANT_LEVEL.size())
- + chance = Config.CRYSTAL_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(Config.CRYSTAL_ARMOR_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.CRYSTAL_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + minEnchantLevel = Config.CRYSTAL_ENCHANT_MIN;
- + maxEnchantLevel = Config.CRYSTAL_ENCHANT_ARMOR_MAX;
- + break;
- + }
- + }
- + else if (donatorScroll)
- + {
- + for (int donatorarmorscroll : DONATOR_ARMOR_SCROLL)
- + if (scroll.getItemId() == donatorarmorscroll)
- + {
- + if (item.getEnchantLevel() >= Config.DONATOR_ARMOR_ENCHANT_LEVEL.size())
- + chance = Config.DONATOR_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(Config.DONATOR_ARMOR_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.DONATOR_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + minEnchantLevel = Config.DONATOR_ENCHANT_MIN;
- + maxEnchantLevel = Config.DONATOR_ENCHANT_ARMOR_MAX;
- + break;
- + }
- + }
- + else
- + for (int normalarmorscroll : NORMAL_ARMOR_SCROLLS)
- + if (scroll.getItemId() == normalarmorscroll)
- + {
- + if (item.getEnchantLevel() >= Config.NORMAL_ARMOR_ENCHANT_LEVEL.size())
- + chance = Config.NORMAL_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(Config.NORMAL_ARMOR_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.NORMAL_ARMOR_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + maxEnchantLevel = Config.ENCHANT_ARMOR_MAX;
- + break;
- + }
- + }
- + else if (item.getItem().getType2() == 2)
- + if (blessedScroll)
- + {
- + for (int blessedjewelscroll : BLESSED_ARMOR_SCROLLS)
- + if (scroll.getItemId() == blessedjewelscroll)
- + {
- + if (item.getEnchantLevel() >= Config.BLESS_JEWELRY_ENCHANT_LEVEL.size())
- + chance = Config.BLESS_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(Config.BLESS_JEWELRY_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.BLESS_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + maxEnchantLevel = Config.BLESSED_ENCHANT_JEWELRY_MAX;
- + break;
- + }
- + }
- + else if (crystalScroll)
- + {
- + for (int crystaljewelscroll : CRYSTAL_ARMOR_SCROLLS)
- + if (scroll.getItemId() == crystaljewelscroll)
- + {
- + if (item.getEnchantLevel() >= Config.CRYSTAL_JEWELRY_ENCHANT_LEVEL.size())
- + chance = Config.CRYSTAL_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(Config.CRYSTAL_JEWELRY_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.CRYSTAL_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + minEnchantLevel = Config.CRYSTAL_ENCHANT_MIN;
- + maxEnchantLevel = Config.CRYSTAL_ENCHANT_JEWELRY_MAX;
- +
- + break;
- + }
- + }
- + else if (donatorScroll)
- + {
- + for (int donatorjewelscroll : DONATOR_ARMOR_SCROLL)
- + if (scroll.getItemId() == donatorjewelscroll)
- + {
- + if (item.getEnchantLevel() >= Config.DONATOR_JEWELRY_ENCHANT_LEVEL.size())
- + chance = Config.DONATOR_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(Config.DONATOR_JEWELRY_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.DONATOR_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + minEnchantLevel = Config.DONATOR_ENCHANT_MIN;
- + maxEnchantLevel = Config.DONATOR_ENCHANT_JEWELRY_MAX;
- + break;
- + }
- + }
- + else
- + for (int normaljewelscroll : NORMAL_ARMOR_SCROLLS)
- + if (scroll.getItemId() == normaljewelscroll)
- + {
- + if (item.getEnchantLevel() >= Config.NORMAL_JEWELRY_ENCHANT_LEVEL.size())
- + chance = Config.NORMAL_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(Config.NORMAL_JEWELRY_ENCHANT_LEVEL.size())).intValue();
- + else
- + chance = Config.NORMAL_JEWELRY_ENCHANT_LEVEL.get(Integer.valueOf(item.getEnchantLevel() + 1)).intValue();
- + maxEnchantLevel = Config.ENCHANT_JEWELRY_MAX;
- + break;
- + }
- + if (maxEnchantLevel != 0 && item.getEnchantLevel() >= maxEnchantLevel || item.getEnchantLevel() < minEnchantLevel)
- + {
- + player.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION);
- + return;
- + }
- + if (Config.SCROLL_STACKABLE)
- + scroll = player.getInventory().destroyItem("Enchant", scroll.getObjectId(), 1, player, item);
- + else
- + scroll = player.getInventory().destroyItem("Enchant", scroll, player, item);
- + if (scroll == null)
- + {
- + player.sendPacket(SystemMessageId.NOT_ENOUGH_ITEMS);
- + return;
- + }
- + if (item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX || item.getItem().getBodyPart() == 32768 && item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX_FULL)
- + chance = 100;
- + int rndValue = Rnd.get(100);
- +
- + Object aChance = item.fireEvent("calcEnchantChance", new Object[chance]);
- + if (aChance != null)
- + chance = ((Integer) aChance).intValue();
- + synchronized (item)
- + {
- + if (rndValue < chance)
- + {
- + if (item.getOwnerId() != player.getObjectId())
- + {
- + player.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION);
- + return;
- + }
- + if (item.getLocation() != ItemInstance.ItemLocation.INVENTORY && item.getLocation() != ItemInstance.ItemLocation.PAPERDOLL)
- + {
- + player.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION);
- + return;
- + }
- + if (item.getEnchantLevel() == 0)
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED);
- + sm.addItemName(item.getItemId());
- + player.sendPacket(sm);
- + if (Config.ENABLE_ENCHANT_ANNOUNCE && Config.LIST_ENCHANT_ANNOUNCE_LEVEL.contains(Integer.valueOf(nextEnchantLevel)))
- + {
- + World.announceToOnlinePlayers(player.getName() + " enchantou " + item.getItemName() + " +" + nextEnchantLevel + " ..");
- + MagicSkillUse MSU = new MagicSkillUse(player, player, 2025, 1, 1, 0);
- + player.sendPacket(MSU);
- + player.broadcastPacket(MSU);
- + }
- + }
- + else
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2_SUCCESSFULLY_ENCHANTED);
- + sm.addNumber(item.getEnchantLevel());
- + sm.addItemName(item.getItemId());
- + player.sendPacket(sm);
- + if (Config.ENABLE_ENCHANT_ANNOUNCE && Config.LIST_ENCHANT_ANNOUNCE_LEVEL.contains(Integer.valueOf(nextEnchantLevel)))
- + {
- + World.announceToOnlinePlayers(player.getName() + " enchantou " + item.getItemName() + " +" + nextEnchantLevel + " ..");
- + MagicSkillUse MSU = new MagicSkillUse(player, player, 2025, 1, 1, 0);
- + player.sendPacket(MSU);
- + player.broadcastPacket(MSU);
- + }
- + }
- + item.setEnchantLevel(item.getEnchantLevel() + 1);
- + item.updateDatabase();
- + }
- + else
- + {
- + if (crystalScroll)
- + {
- + SystemMessage sm = SystemMessage.sendString("Failed in Crystal Enchant. The enchant value of the item become " + Config.CRYSTAL_ENCHANT_MIN);
- + player.sendPacket(sm);
- + }
- + else if (blessedScroll)
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.BLESSED_ENCHANT_FAILED);
- + player.sendPacket(sm);
- + }
- + else if (donatorScroll)
- + {
- + if (Config.DONATOR_DECREASE_ENCHANT)
- + {
- + if (item.getEnchantLevel() <= Config.DONATOR_ENCHANT_MIN)
- + {
- + SystemMessage sm1 = SystemMessage.sendString("Failed Golden Enchant.");
- + player.sendPacket(sm1);
- + }
- + else
- + {
- + SystemMessage sm1 = SystemMessage.sendString("Failed Golden Enchant. His equipment had 1 reduced enchant.");
- + player.sendPacket(sm1);
- + }
- + }
- + else
- + {
- + SystemMessage sm1 = SystemMessage.sendString("Failed Golden Enchant.");
- + player.sendPacket(sm1);
- + }
- + }
- + else if (item.getEnchantLevel() > 0)
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.ENCHANTMENT_FAILED_S1_S2_EVAPORATED);
- + sm.addNumber(item.getEnchantLevel());
- + sm.addItemName(item.getItemId());
- + player.sendPacket(sm);
- + }
- + else
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.ENCHANTMENT_FAILED_S1_EVAPORATED);
- + sm.addItemName(item.getItemId());
- + player.sendPacket(sm);
- + }
- + if (!blessedScroll && !crystalScroll && !donatorScroll)
- + {
- + if (item.getEnchantLevel() > 0)
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.EQUIPMENT_S1_S2_REMOVED);
- + sm.addNumber(item.getEnchantLevel());
- + sm.addItemName(item.getItemId());
- + player.sendPacket(sm);
- + }
- + else
- + {
- + SystemMessage sm = new SystemMessage(SystemMessageId.S1_DISARMED);
- + sm.addItemName(item.getItemId());
- + player.sendPacket(sm);
- + }
- + if (item.isEquipped())
- + {
- + if (item.isAugmented())
- + item.getAugmentation().removeBonus(player);
- + ItemInstance[] unequiped = player.getInventory().unEquipItemInSlotAndRecord(item.getEquipSlot());
- +
- + InventoryUpdate iu = new InventoryUpdate();
- + for (ItemInstance element : unequiped)
- + iu.addModifiedItem(element);
- + player.sendPacket(iu);
- +
- + player.broadcastUserInfo();
- + }
- + int count = item.getCrystalCount() - (item.getItem().getCrystalCount() + 1) / 2;
- + if (count < 1)
- + count = 1;
- + if (item.fireEvent("enchantFail", new Object[0]) != null)
- + return;
- + ItemInstance destroyItem = player.getInventory().destroyItem("Enchant", item, player, null);
- + if (destroyItem == null)
- + return;
- + ItemInstance crystals = player.getInventory().addItem("Enchant", crystalId, count, player, destroyItem);
- +
- + SystemMessage sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
- + sm.addItemName(crystals.getItemId());
- + sm.addNumber(count);
- + player.sendPacket(sm);
- +
- + player.sendPacket(new ItemList(player, true));
- +
- + StatusUpdate su = new StatusUpdate(player);
- + su.addAttribute(14, player.getCurrentLoad());
- + player.sendPacket(su);
- +
- + player.broadcastUserInfo();
- +
- + World world = World.getInstance();
- + world.removeObject(destroyItem);
- + }
- + else if (blessedScroll)
- + {
- + item.setEnchantLevel(Config.BREAK_ENCHANT);
- + item.updateDatabase();
- + }
- + else if (crystalScroll)
- + {
- + item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN);
- + item.updateDatabase();
- + }
- + else if (donatorScroll)
- + {
- + if (Config.DONATOR_DECREASE_ENCHANT)
- + {
- + if (item.getEnchantLevel() <= Config.DONATOR_ENCHANT_MIN)
- + item.setEnchantLevel(item.getEnchantLevel());
- + else
- + item.setEnchantLevel(item.getEnchantLevel() - 1);
- + }
- + else
- + item.setEnchantLevel(item.getEnchantLevel());
- + item.updateDatabase();
- + }
- + }
- + }
- +
- Index: net.sf.l2j.gameserver.network.serverpackets;SystemMessage.java
- ===================================================================
- --- net.sf.l2j.gameserver.network.serverpackets;SystemMessage.java (revision 84)
- +++ net.sf.l2j.gameserver.network.serverpackets;SystemMessage.java (working copy)
- - private SystemMessage(final SystemMessageId smId)
- - {
- - final int paramCount = smId.getParamCount();
- - _smId = smId;
- - _params = paramCount != 0 ? new SMParam[paramCount] : EMPTY_PARAM_ARRAY;
- - }
- + public SystemMessage(final SystemMessageId smId)
- + {
- + final int paramCount = smId.getParamCount();
- + _smId = smId;
- + _params = paramCount != 0 ? new SMParam[paramCount] : EMPTY_PARAM_ARRAY;
- + }
- Index: net.sf.l2j.gameserver.model.item.instance;ItemInstance.java
- ===================================================================
- --- net.sf.l2j.gameserver.model.item.instance;ItemInstance.java (revision 84)
- +++ net.sf.l2j.gameserver.model.item.instance;ItemInstance.java (working copy)
- - import net.sf.l2j.gameserver.model.World;
- + import net.sf.l2j.gameserver.model.World;
- + import net.sf.l2j.gameserver.model.extender.BaseExtender;
- + private final BaseExtender _extender = null;
- +
- + public Object fireEvent(String event, Object... params)
- + {
- + if (_extender == null)
- + return null;
- + return _extender.onEvent(event, params);
- + }
- +
- + public int getEquipSlot()
- + {
- + if (Config.DEBUG_PATH && _loc != ItemLocation.PAPERDOLL && _loc != ItemLocation.PET_EQUIP && _loc != ItemLocation.FREIGHT)
- + throw new AssertionError();
- + return _locData;
- + }
- Index: net.sf.l2j.gameserver.model.extender;BaseExtender.java (New Packt)
- ===================================================================
- --- net.sf.l2j.gameserver.model.extender;BaseExtender.java (New Packt)
- +++ net.sf.l2j.gameserver.model.extender;BaseExtender.java (New Packt)
- + package net.sf.l2j.gameserver.model.extender;
- +
- + import net.sf.l2j.gameserver.model.WorldObject;
- +
- + public class BaseExtender
- + {
- + protected WorldObject _owner;
- +
- + public static enum EventType
- + {
- + LOAD("load"),
- + STORE("store"),
- + CAST("cast"),
- + ATTACK("attack"),
- + CRAFT("craft"),
- + ENCHANT("enchant"),
- + SPAWN("spawn"),
- + DELETE("delete"),
- + SETOWNER("setwoner"),
- + DROP("drop"),
- + DIE("die"),
- + REVIVE("revive"),
- + SETINTENTION("setintention");
- +
- + public final String name;
- +
- + private EventType(String name)
- + {
- + this.name = name;
- + }
- + }
- +
- + public static boolean canCreateFor(WorldObject object)
- + {
- + return true;
- + }
- +
- + private BaseExtender _next = null;
- +
- + public BaseExtender(WorldObject owner)
- + {
- + _owner = owner;
- + }
- +
- + public WorldObject getOwner()
- + {
- + return _owner;
- + }
- +
- + public Object onEvent(String event, Object... params)
- + {
- + if (_next == null)
- + return null;
- + return _next.onEvent(event, params);
- + }
- +
- + public BaseExtender getExtender(String simpleClassName)
- + {
- + if (getClass().getSimpleName().compareTo(simpleClassName) == 0)
- + return this;
- + if (_next != null)
- + return _next.getExtender(simpleClassName);
- + return null;
- + }
- +
- + public void removeExtender(BaseExtender ext)
- + {
- + if (_next != null)
- + if (_next == ext)
- + _next = _next._next;
- + else
- + _next.removeExtender(ext);
- + }
- +
- + public BaseExtender getNextExtender()
- + {
- + return _next;
- + }
- +
- + public void addExtender(BaseExtender newExtender)
- + {
- + if (_next == null)
- + _next = newExtender;
- + else
- + _next.addExtender(newExtender);
- + }
- + }
- +
- Index: config/enchant.properties
- ===================================================================
- --- config/enchant.properties (revision 84)
- +++ config/enchant.properties (working copy)
- + #============================================================#
- + # ENCHANT SETTINGS #
- + #============================================================#
- + # ----------------------------------------------
- + # Special Enchanting System -
- + # ----------------------------------------------
- + # Chance enchanting presented as a series of pairs of numbers where the first
- + # Indicates the number of levels, and the second chance of successful enchanting.
- + # Also have the option of limiting the maximum level of echanting
- + # For weapons / armor / jewelry.
- + # If you have a maximum level of grinding 50 and you do not want
- + # Give all the chances for each level (from 1 to 50) then
- + # You can specify for example:
- + # NormalWeaponEnchantLevel = 1,50; 2,50; 3,50; 4,75; 5,50;
- + # Example: 5,92; = if you enchant weapon to +5 you have 92% to success.
- + # ----------------------------------------------
- + # CHANCE FOR NORMAL SCROLLS -
- + # ----------------------------------------------
- + # Weapon
- + NormalWeaponEnchantLevel = 1,50;2,50;3,50;4,70;5,70;6,70;7,70;8,70;9,70;10,70;11,70;12,70;13,70;14,70;15,70;16,70;17,70;18,70;19,70;20,70;21,70;22,70;23,70;24,70;25,70;
- + # Armor
- + NormalArmorEnchantLevel = 1,50;2,50;3,50;4,70;5,70;6,70;7,70;8,70;9,70;10,70;11,70;12,70;13,70;14,70;15,70;16,70;17,70;18,70;19,70;20,70;21,70;22,70;23,70;24,70;25,70;
- + # Jewel
- + NormalJewelryEnchantLevel = 1,50;2,50;3,50;4,70;5,70;6,70;7,70;8,70;9,70;10,70;11,70;12,70;13,70;14,70;15,70;16,70;17,70;18,70;19,70;20,70;21,70;22,70;23,70;24,70;25,70;
- +
- + # ----------------------------------------------
- + # CHANCE FOR BLESSEDS SCROLLS -
- + # ----------------------------------------------
- + # Weapon
- + BlessWeaponEnchantLevel = 1,50;2,50;3,50;4,50;5,50;6,50;7,50;8,50;9,50;10,50;11,50;12,50;13,50;14,50;15,50;16,50;17,50;18,50;19,50;20,50;21,50;22,50;23,50;24,50;25,50;26,50;27,50;28,50;29,50;30,50;
- + # Armor
- + BlessArmorEnchantLevel = 1,50;2,50;3,50;4,50;5,50;6,50;7,50;8,50;9,50;10,50;11,50;12,50;13,50;14,50;15,50;16,50;17,50;18,50;19,50;20,50;21,50;22,50;23,50;24,50;25,50;26,50;27,50;28,50;29,50;30,50;
- + # Jewel
- + BlessJewelryEnchantLevel = 1,50;2,50;3,50;4,50;5,50;6,50;7,50;8,50;9,50;10,50;11,50;12,50;13,50;14,50;15,50;16,50;17,50;18,50;19,50;20,50;21,50;22,50;23,50;24,50;25,50;26,50;27,50;28,50;29,50;30,50;
- +
- + # ---------------------------------------------
- + # CHANCE FOR CRYSTALS SCROLLS -
- + # ---------------------------------------------
- + # Weapon
- + CrystalWeaponEnchantLevel = 1,50;2,50;3,50;4,50;5,50;6,50;7,50;8,50;9,50;10,50;11,50;12,50;13,50;14,50;15,50;16,50;17,50;18,50;19,50;20,50;21,50;22,50;23,50;24,50;25,50;26,50;27,50;28,50;29,50;30,50;
- + # Armor
- + CrystalArmorEnchantLevel = 1,50;2,50;3,50;4,50;5,50;6,50;7,50;8,50;9,50;10,50;11,50;12,50;13,50;14,50;15,50;16,50;17,50;18,50;19,50;20,50;21,50;22,50;23,50;24,50;25,50;26,50;27,50;28,50;29,50;30,50;
- + # Jewel
- + CrystalJewelryEnchantLevel = 1,50;2,50;3,50;4,50;5,50;6,50;7,50;8,50;9,50;10,50;11,50;12,50;13,50;14,50;15,50;16,50;17,50;18,50;19,50;20,50;21,50;22,50;23,50;24,50;25,50;26,50;27,50;28,50;29,50;30,50;
- +
- + # ---------------------------------------------
- + # CHANCE FOR DONATOR SCROLLS -
- + # ---------------------------------------------
- + # Weapon
- + DonatorWeaponEnchantLevel = 1,100;2,100;3,100;4,100;5,100;6,100;7,100;8,100;9,100;10,100;11,100;12,100;13,100;14,100;15,100;16,100;17,100;18,100;19,100;20,100;21,80;22,60;23,40;24,20;25,10;
- + # Armor
- + DonatorArmorEnchantLevel = 1,100;2,100;3,100;4,100;5,100;6,100;7,100;8,100;9,100;10,100;11,100;12,100;13,100;14,100;15,100;16,100;17,100;18,100;19,100;20,100;21,80;22,60;23,40;24,20;25,10;
- + # Jewel
- + DonatorJewelryEnchantLevel = 1,100;2,100;3,100;4,100;5,100;6,100;7,100;8,100;9,100;10,100;11,100;12,100;13,100;14,100;15,100;16,100;17,100;18,100;19,100;20,100;21,80;22,60;23,40;24,20;25,10;
- +
- + # On / off enchant hero weapons
- + EnableEnchantHeroWeapons = False
- +
- + # Scroll em um so slot
- + ScrollStackable = True
- +
- + # Safe enchant
- + EnchantSafeMax = 4
- + EnchantSafeMaxFull = 4
- +
- + # Max enchant Settings by scrolls.
- + EnchantWeaponMax=15
- + EnchantArmorMax=8
- + EnchantJewelryMax=8
- +
- + # Blessed Limit
- + BlessedEnchantWeaponMax = 15
- + BlessedEnchantArmorMax = 15
- + BlessedEnchantJewelryMax = 15
- +
- + # Enchant after break with blessed scroll.
- + BreakEnchant = 4
- +
- + # Crystal Limits
- + CrystalEnchantMin = 4
- + CrystalEnchantWeaponMax = 20
- + CrystalEnchantArmorMax = 20
- + CrystalEnchantJewelryMax = 20
- +
- + # Donator Enchant Limits
- + DonatorEnchantMin = 4
- + DonatorEnchantWeaponMax = 25
- + DonatorEnchantArmorMax = 25
- + DonatorEnchantJewelryMax = 25
- + DonatorBreakEnchant = 20
- +
- + # Se true quando enchant falhar, ira perder o enchant atual e reduzira 1 enchant no equipament
- + # se false o enchant falha, mas nao reduzira enchant no equipament, permanecera o mesmo enchant
- + DonatorDecreaseEnchant = True
- +
- + # Id donator scroll weapon
- + IdEnchantDonatorWeapon = 9506
- +
- + # Id donator scroll armor
- + IdEnchantDonatorArmor = 9507
- +
- + # Announce enchant successful
- + EnableEnchantAnnounce = True
- + EnchantAnnounceLevels = 20,21,22,23,24,25
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement