Jump to content
  • 0

Enchant Configs For Acis.


DrenepiaWorld

Question

Hello guys, i'm looking for a code for Enchant Configs for aCis.

I searched and i couldn't find something working.

 

I'm not asking for crazy things like to set rate for every enchant level or not brake or w/e.

I just want config files for enchants.

 

Here is an example of what i want:

WeaponNormalEnchantRate = 50
ArmorNormalEnchantRate = 50
JewelsNormalEnchantRate = 50
WeaponBlessedEnchantRate = 50
ArmorBlessedEnchantRate = 50
JewelsNormalEnchantRate = 50
WeaponCrystalEnchantRate = 50
ArmorCrystalEnchantRate = 50
JewelsCrystalEnchantRate = 50

As a reward i can create a banner,logo or cover for him and give him a rep for his help.

 

Thanks in advance.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Lock it.

I "fixed" an old code and it's working.

 

If someone need the code here you are

Go to: gameserver/network/clientpacket/AbstractEnchantPacket.java  find this

if (enchantItem.isArmor())
                chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR, (enchantItem.getEnchantLevel() - 2));
            // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14.
            else if (enchantItem.isWeapon())
            {
                if (((L2Weapon) enchantItem.getItem()).isMagical())
                    chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_MAGIC;
                else
                    chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC;
            }

And replace it with this

if (isBlessed())
            {
                if (enchantItem.isArmor())
                    chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR_BLESSED, (enchantItem.getEnchantLevel() - 2));
                // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14.
                else if (enchantItem.isWeapon())
                {
                    if (((Weapon) enchantItem.getItem()).isMagical())
                        chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_BLESSED : Config.ENCHANT_CHANCE_WEAPON_MAGIC_BLESSED;
                    else
                        chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_BLESSED : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_BLESSED;
                }
            }
            else if (isCrystal())
            {
                if (enchantItem.isArmor())
                    chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR_CRYSTAL, (enchantItem.getEnchantLevel() - 2));
                // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14.
                else if (enchantItem.isWeapon())
                {
                    if (((Weapon) enchantItem.getItem()).isMagical())
                        chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_CRYSTAL : Config.ENCHANT_CHANCE_WEAPON_MAGIC_CRYSTAL;
                    else
                        chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_CRYSTAL : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_CRYSTAL;
                }
            }
            else
            {
                if (enchantItem.isArmor())
                    chance = Math.pow(Config.ENCHANT_CHANCE_ARMOR, (enchantItem.getEnchantLevel() - 2));
                // Weapon formula is 70% for fighter weapon, 40% for mage weapon. Special rates after +14.
                else if (enchantItem.isWeapon())
                {
                    if (((Weapon) enchantItem.getItem()).isMagical())
                        chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_MAGIC;
                    else
                        chance = (enchantItem.getEnchantLevel() > 14) ? Config.ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS : Config.ENCHANT_CHANCE_WEAPON_NONMAGIC;
                }
            }

The Configs @ net.sf.l2j.Config.java

public static double ENCHANT_CHANCE_WEAPON_MAGIC;
public static double ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS;
public static double ENCHANT_CHANCE_WEAPON_NONMAGIC;
public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS;
+public static double ENCHANT_CHANCE_WEAPON_MAGIC_BLESSED;
+public static double ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_BLESSED;
+public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_BLESSED;
+public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_BLESSED;
+public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_CRYSTAL;
+public static double ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_CRYSTAL;
+public static double ENCHANT_CHANCE_WEAPON_MAGIC_CRYSTAL;
+public static double ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_CRYSTAL;
public static double ENCHANT_CHANCE_ARMOR;
+public static double ENCHANT_CHANCE_ARMOR_BLESSED;
+public static double ENCHANT_CHANCE_ARMOR_CRYSTAL;
ENCHANT_CHANCE_WEAPON_MAGIC = players.getProperty("EnchantChanceMagicWeapon", 0.4);
ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS = players.getProperty("EnchantChanceMagicWeapon15Plus", 0.2);
ENCHANT_CHANCE_WEAPON_NONMAGIC = players.getProperty("EnchantChanceNonMagicWeapon", 0.7);
ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS = players.getProperty("EnchantChanceNonMagicWeapon15Plus", 0.35);
+ENCHANT_CHANCE_WEAPON_MAGIC_BLESSED = players.getProperty("EnchantChangeWeaponMagicBlessed", 0.35);
+ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_BLESSED = players.getProperty("EnchantChangeWeaponMagic15PlusBlessed", 0.35);
+ENCHANT_CHANCE_WEAPON_NONMAGIC_BLESSED = players.getProperty("EnchantChangeWeaponNonMagicBlessed", 0.35);
+ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_BLESSED = players.getProperty("EnchantChangeWeaponNonMagic15PlusBlessed", 0.35);
+ENCHANT_CHANCE_WEAPON_NONMAGIC_CRYSTAL = players.getProperty("EnchantChanceWeaponNonMagicCrystal", 0.35);
+ENCHANT_CHANCE_WEAPON_NONMAGIC_15PLUS_CRYSTAL = players.getProperty("EnchantChanceWeaponNonMagic15PlusCrystal", 0.35);
+ENCHANT_CHANCE_WEAPON_MAGIC_CRYSTAL = players.getProperty("EnchantChanceWeaponMagicCrystal", 0.35);
+ENCHANT_CHANCE_WEAPON_MAGIC_15PLUS_CRYSTAL = players.getProperty("EnchantChanceWeaponMagic15PlusCrystal", 0.35);
ENCHANT_CHANCE_ARMOR = players.getProperty("EnchantChanceArmor", 0.66);
+ENCHANT_CHANCE_ARMOR_BLESSED = players.getProperty("EnchantChanceArmorBlessed", 0.66); 
+ENCHANT_CHANCE_ARMOR_CRYSTAL = players.getProperty("EnchantChanceArmorCrystal", 0.66);

And the properties

# % chance of success to enchant a non magic weapon with normal scroll
EnchantChanceNonMagicWeapon = 0.55
EnchantChanceNonMagicWeapon15Plus = 0.55
+
+# % chance of success to enchant a magic weapon with blessed scroll
+EnchantChangeWeaponMagicBlessed = 0.75
+EnchantChangeWeaponMagic15PlusBlessed = 0.75
+
+# % chance of success to enchant a non magic weapon with blessed scroll
+EnchantChangeWeaponNonMagicBlessed = 0.75
+EnchantChangeWeaponNonMagic15PlusBlessed = 0.75
+
+# % chance of success to enchant a magic weapon with crystal scroll
+EnchantChanceWeaponMagicCrystal = 0.95
+EnchantChanceWeaponMagic15PlusCrystal = 0.95
+
+# % chance of success to enchant a non magic weapon with crystal scroll
+EnchantChanceWeaponNonMagicCrystal = 0.95
+EnchantChanceWeaponNonMagic15PlusCrystal = 0.95
+
# % chance of success for normal scrolls to enchant an armor part (both jewelry or armor)
EnchantChanceArmor = 0.66
+
+# % chance of success for blessed scrolls to enchant an armor part (both jewelry or armor)
+EnchantChanceArmorBlessed = 0.75
+
+# % chance of success for crystal scrolls to enchant an armor part (both jewelry or armor)
+EnchantChanceArmorCrystal = 0.95

# Enchant limit [default = 0]
EnchantMaxWeapon = 0
EnchantMaxArmor = 0
Link to comment
Share on other sites

  • 0

You need rework AbstractEnchantPacket.java for new configuration.

i'm very noob on java, i only know to add a ready code on my source, remove the "+" and change the text :troll:

Link to comment
Share on other sites

  • 0

It's best case for start to learning Java. Nobody will not to write a code for you a free.

 

We can give to you only info where and what.  :happyforever:

 

Link to comment
Share on other sites

  • 0

well, i found a lot of codes, the one of Hasha with the xml and the simple one for blessed and crystal but i got tons of errors which i can't fix xd

i'll give one more try, i'll fix it or i'll fck the whole enchant system ;D

Edited by Psyancy
Link to comment
Share on other sites

  • 0

well, i found a lot of codes, the one of Hasha with the xml and the simple one for blessed and crystal but i got tons of errors which i can't fix xd

i'll give one more try, i'll fix it or i'll fck the whole enchant system ;D

Pm me psyancy i will give you this code..is for normal scrolls blessed and crystal...max enchant and change with config.
Link to comment
Share on other sites

  • 0

Because Hasha code was updated sometime ago by the new aCis model. Now we have equip grade variable as ENUM. It's one of some problems in code.

yup, i know. i had this code on my previous sources with an older revision and i didn't had any problem with both codes

 

Pm me psyancy i will give you this code..is for normal scrolls blessed and crystal...max enchant and change with config.

alright mate, i'll pm you now, thanks :)

Link to comment
Share on other sites

  • 0

Pm me psyancy i will give you this code..is for normal scrolls blessed and crystal...max enchant and change with config.

 

 

Why you giving it with pm? Maybe someone looking for it too? Cant you just share in topic? ..

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Многие анонсеры ла2 перестали быть актуальными в 2024 году,  https://l2-top.ru/  предоставляет возможность размещаться как бесплатно, так и на условиях vip, у нас: низкие цены огромный дневной охват трафика регулярная поддержка, мы помогаем вам с открытием вашего сервера л2 с удовольствием !   p.s Модерации если я нарушаю правила - то не специально, перенесите или удалите тему пожалуйста  если все хорошо я очень рад за размещение ❤️ 
    • Играл тоже здесь - хороший сервер Выбирал на анонсере серверов Lineage 2 https://l2-top.ru/
    • As a sidenote, it was added in aCis 408, under //find subcategory : AdminCommands - Revamp //tele panels. - Introduce //find item [name]. Ty melron for initial idea, StinkyMadness/CUCU23 for improvements. - Introduce //find npc [name], delete 6 related admincommands : - admin_show_spawns - admin_spawn_index - admin_spawn_reload - admin_npc_index - admin_spawn_once - admin_show_npcs
    • German Produced Hager Werken Embalming Compound Pink Powder in General it 1kg=R8000 Hager werken embalming powder +27839281381 made in Germany, available in Johannesburg South Africa. Embalming is the art and science of preserving human remains by treating them (in its modern form with chemicals) to forestall decomposition. The intention is to keep them suitable for public display at a funeral, for religious reasons, or for medical and scientific purposes such as their use as anatomical specimens.[1] The three goals of embalming are senitization, presentation and preservation (or restoration). Embalming has a very long and cross-cultural history, with many cultures giving the embalming processes a greater religious meaning. Specific uses are: sanitization, presentation and preservation (or restoration). Types of embalming powder types of embalming powder is dependent on the purity . Purity: 98%, 100% Hot Compound Origin: Germany Brand: Hager Werken PURITY ON COLOR. Pink: 98% White: 100% Hager werken products are sold through the Dental trade worldwide Please contact your pharmacist or dentist. Dealers if you are not currently a Hager werken Customer please contact our Customer Service Distributor direct in south Africa: +27839281381 contact: +27839281381 Email: ivanssente@gmail.com website: https://embalmingpowderfor.wixsite.com/mysite We transport them worldwide by DHL or by post office speed delivery
    • German Produced Hager Werken Embalming Compound Pink Powder in General it 1kg=R8000 Hager werken embalming powder +27839281381 made in Germany, available in Johannesburg South Africa. Embalming is the art and science of preserving human remains by treating them (in its modern form with chemicals) to forestall decomposition. The intention is to keep them suitable for public display at a funeral, for religious reasons, or for medical and scientific purposes such as their use as anatomical specimens.[1] The three goals of embalming are senitization, presentation and preservation (or restoration). Embalming has a very long and cross-cultural history, with many cultures giving the embalming processes a greater religious meaning. Specific uses are: sanitization, presentation and preservation (or restoration). Types of embalming powder types of embalming powder is dependent on the purity . Purity: 98%, 100% Hot Compound Origin: Germany Brand: Hager Werken PURITY ON COLOR. Pink: 98% White: 100% Hager werken products are sold through the Dental trade worldwide Please contact your pharmacist or dentist. Dealers if you are not currently a Hager werken Customer please contact our Customer Service Distributor direct in south Africa: +27839281381 contact: +27839281381 Email: ivanssente@gmail.com website: https://embalmingpowderfor.wixsite.com/mysite We transport them worldwide by DHL or by post office speed delivery
  • Topics

×
×
  • Create New...