Jump to content

Recommended Posts

Posted

I found this share made by Zoey76. It's very helpful.

 

Added 3 new config options:

  • EnableSkillEnchant: when it's false players cannot enchant skills.
  • EnableSkillMaxEnchantLimit: when its 0 it will remove the skill enchant level, when its over 0 and under 30 it will cutoff the skill level down to SkillMaxEnchantLimitLevel's value.
  • SkillMaxEnchantLimitLevel: cutoff skill enchant value.
  • You cannot enchant skills over SkillMaxEnchantLimitLevel.

This patch add's new options to avoid skill overenchanting and check and cutoff overenchated skills.
It' gives you control on previous skills and allow you to avoid new overenchanting and exploits aswell.

 

 

# Created by Zoey76
# Version 0.3
# Updated to High Five Rev.5771
# Shortened the algorithm.
# Added check to avoid skill overenchanting.
# Based on Starter's idea/work to cutoff skill enchanting.
# Based on Lineage's Work to avoid skill overenchanting.
# Thanks SolidSnake for time and tips.
#P L2J_Server_BETA
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5769)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -15769,6 +15769,31 @@
  for (int id : getSkills().keySet())
  {
  int level = getSkillLevel(id);
+ if (Config.ENABLE_SKILL_MAX_ENCHANT_LIMIT)
+ {
+ L2Skill fixedSkill = null;
+ int oldLevel = level % 100;
+ if (Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL > 0) // Nerf enchantment
+ {
+ if (oldLevel > Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)
+ {
+ level = ((level / 100) * 100) + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL;
+ fixedSkill = SkillTable.getInstance().getInfo(id, level);
+ }
+ }
+ else if (Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL == 0) // Remove enchantment
+ {
+ level = SkillTable.getInstance().getMaxLevel(id);
+ fixedSkill = SkillTable.getInstance().getInfo(id, level);
+ }
+ // Setting the new level enchat for the skill.
+ if (fixedSkill != null)
+ {
+ _log.info("Decreasing skill enchantment from " + oldLevel + " to " + level + " on skill " + id + " from Player: " + getName() + "!");
+ addSkill(fixedSkill, true);
+ }
+ }
+ 
  if (level >= 100)
  {
  level = SkillTable.getInstance().getMaxLevel(id);
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java (revision 5741)
+++ java/com/l2jserver/Config.java (working copy)
@@ -252,6 +252,9 @@
  public static boolean STORE_UI_SETTINGS;
  public static String[] FORBIDDEN_NAMES;
  public static boolean SILENCE_MODE_EXCLUDE;
+ public static boolean ENABLE_SKILL_ENCHANT;
+ public static boolean ENABLE_SKILL_MAX_ENCHANT_LIMIT;
+ public static int SKILL_MAX_ENCHANT_LIMIT_LEVEL;
  
  // --------------------------------------------------
  // ClanHall Settings
@@ -1720,6 +1723,9 @@
  FORBIDDEN_NAMES = Character.getProperty("ForbiddenNames", "").split(",");
  SILENCE_MODE_EXCLUDE = Boolean.parseBoolean(Character.getProperty("SilenceModeExclude", "False"));
  PLAYER_MOVEMENT_BLOCK_TIME = Integer.parseInt(Character.getProperty("NpcTalkBlockingTime", "0")) * 1000;
+ ENABLE_SKILL_ENCHANT = Boolean.parseBoolean(Character.getProperty("EnableSkillEnchant", "True"));
+ ENABLE_SKILL_MAX_ENCHANT_LIMIT = Boolean.parseBoolean(Character.getProperty("EnableSkillMaxEnchantLimit", "False"));
+ SKILL_MAX_ENCHANT_LIMIT_LEVEL = Integer.parseInt(Character.getProperty("SkillMaxEnchantLimitLevel", "30"));
  
  // Load L2J Server Version L2Properties file (if exists)
  L2Properties serverVersion = new L2Properties();
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkill.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkill.java (revision 5741)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkill.java (working copy)
@@ -73,6 +73,20 @@
  return;
  }
  
+ if (Config.ENABLE_SKILL_ENCHANT)
+ {
+ if ((_skillLvl % 100) >= Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)
+ {
+ player.sendMessage("You have reached maximum skill enchantment level. Allowed on this server up to " + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL + ".");
+ return;
+ }
+ }
+ else
+ {
+ player.sendMessage("You may not use the skill enchantment system is currently turned off.");
+ return;
+ }
+ 
  if (player.getClassId().level() < 3) // requires to have 3rd class quest completed
  {
  player.sendPacket(SystemMessageId.YOU_CANNOT_USE_SKILL_ENCHANT_IN_THIS_CLASS);
Index: java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkillSafe.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkillSafe.java (revision 5741)
+++ java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantSkillSafe.java (working copy)
@@ -73,6 +73,20 @@
  return;
  }
  
+ if (Config.ENABLE_SKILL_ENCHANT)
+ {
+ if ((_skillLvl % 100) >= Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL)
+ {
+ player.sendMessage("You have reached maximum skill enchantment level. Allowed on this server up to " + Config.SKILL_MAX_ENCHANT_LIMIT_LEVEL + ".");
+ return;
+ }
+ }
+ else
+ {
+ player.sendMessage("You may not use the skill enchantment system is currently turned off.");
+ return;
+ }
+ 
  if (player.getClassId().level() < 3) // requires to have 3rd class quest completed
  {
  player.sendPacket(SystemMessageId.YOU_CANNOT_USE_SKILL_ENCHANT_IN_THIS_CLASS);
Index: dist/game/config/Character.properties
===================================================================
--- dist/game/config/Character.properties (revision 5722)
+++ dist/game/config/Character.properties (working copy)
@@ -81,7 +81,18 @@
 # Default: False
 AutoLearnForgottenScrollSkills = False
 
+# Turn this off to avoid skill enchanting.
+# Default: True
+EnableSkillEnchant = True
+# When this is enabled it will read the "SkillMaxEnchantLimitLevel" option.
 # Default: False
+EnableSkillMaxEnchantLimit = False
+# When this is over 0, it will cutoff the skill enchant level to it's value.
+# When it's 0 it will removed the current skill enchant.
+# Default: 30
+SkillMaxEnchantLimitLevel = 30
+
+# Default: False
 AutoLootHerbs = False
 
 # Maximum number of buffs and songs/dances.
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: 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