Jump to content

Question

Posted

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.

10 answers to this question

Recommended Posts

  • 0
Posted

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
  • 0
Posted (edited)

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
  • 0
Posted

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.
  • 0
Posted

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 :)

  • 0
Posted

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? ..

Guest
This topic is now closed to further replies.


  • Posts

    • @Celestine ban him please this same scammer   
    • https://jmp.sh/akQ30Yon   Watch the video and see if the spirit of Lineage 2 is still there?
    • 新产品!快来抢购独家新品,以最优价格购买! ➡带文件验证的 Facebook Business Manager (BM) | 绑定到已激活的 Business Manager 账户 | 限额 $50(第一天)+ $250(后续天数)| 价格从 $25 起 ➡在 Fragment.com 上验证的 Telegram 资料 | 账户通过真实文件验证 | 包含 Telegram 账户格式:TDATA + SESSION + JSON + 2FA + 密码 | 地区:MIX | 价格从 $30 起 ➡Telegram 哈萨克斯坦 +7 | 格式:TDATA + SESSION + JSON | 无垃圾邮件限制 | 2FA 启用 | 账户年龄:从 3 天起 | 价格从 $2.5 起 ➡Adobe Creative Cloud 订阅 7 天 / 30 天 / 3 个月 / 1 年(任选时长)| 所有应用和所有语言可用 | AI 功能 1000+ 积分 | 个人账户 | 价格从 $5 起 可通过网站或 Bot 在我们的商店购买! 有效链接: 数字商品商店(网站):进入 商店 Telegram Bot:进入 – 通过 Telegram 方便访问商店。 其他服务: Telegram Stars 购买 Bot:进入 – 快速且划算地购买 Telegram Stars。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您呈现当前购买我们产品和服务的促销和特别优惠列表: 1. 九月在我们的商店(网站、Bot)购买可使用优惠码 OCTOBER2025(8% 折扣)!首次购买也可使用优惠码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 注册后按照格式发布用户名:“SEND ME BONUS, MY USERNAME IS…” — 发布在我们的论坛帖中! 3. 第一次 SMM 面板试用可获得 $1 — 只需在我们网站(Support)打开主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和 Stars 购买 Bot 中赠送 Telegram Stars! 新闻: ➡ Telegram 频道:https://t.me/accsforyou_shop ➡ WhatsApp 频道:https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器:https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram:https://t.me/socnet_support ➡ WhatsApp:https://wa.me/79051904467 ➡ Discord:socnet_support ➡ ✉ 邮箱:solomonbog@socnet.store
    • 新产品!快来抢购独家新品,以最优价格购买! ➡带文件验证的 Facebook Business Manager (BM) | 绑定到已激活的 Business Manager 账户 | 限额 $50(第一天)+ $250(后续天数)| 价格从 $25 起 ➡在 Fragment.com 上验证的 Telegram 资料 | 账户通过真实文件验证 | 包含 Telegram 账户格式:TDATA + SESSION + JSON + 2FA + 密码 | 地区:MIX | 价格从 $30 起 ➡Telegram 哈萨克斯坦 +7 | 格式:TDATA + SESSION + JSON | 无垃圾邮件限制 | 2FA 启用 | 账户年龄:从 3 天起 | 价格从 $2.5 起 ➡Adobe Creative Cloud 订阅 7 天 / 30 天 / 3 个月 / 1 年(任选时长)| 所有应用和所有语言可用 | AI 功能 1000+ 积分 | 个人账户 | 价格从 $5 起 可通过网站或 Bot 在我们的商店购买! 有效链接: 数字商品商店(网站):进入 商店 Telegram Bot:进入 – 通过 Telegram 方便访问商店。 其他服务: Telegram Stars 购买 Bot:进入 – 快速且划算地购买 Telegram Stars。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您呈现当前购买我们产品和服务的促销和特别优惠列表: 1. 九月在我们的商店(网站、Bot)购买可使用优惠码 OCTOBER2025(8% 折扣)!首次购买也可使用优惠码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 注册后按照格式发布用户名:“SEND ME BONUS, MY USERNAME IS…” — 发布在我们的论坛帖中! 3. 第一次 SMM 面板试用可获得 $1 — 只需在我们网站(Support)打开主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和 Stars 购买 Bot 中赠送 Telegram Stars! 新闻: ➡ Telegram 频道:https://t.me/accsforyou_shop ➡ WhatsApp 频道:https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器:https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram:https://t.me/socnet_support ➡ WhatsApp:https://wa.me/79051904467 ➡ Discord:socnet_support ➡ ✉ 邮箱:solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock